|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Run a Citrix AppWe have some applications that run on a Citrix server. I would like to run one of them, a reporting app, from within a VB.net application. If I log into the Citrix server with remote desktop, I can type a command line that will do what I want. My VB.net application is not on that Citrix server. I'm afraid that if I map a drive to the Citrix box and shell out to the reporting app that I'll take it over -- that is, my use of the application won't be managed by Citrix. I normally access the reporting app by running a "Citrix Neighborhood" on my desktop. The app is publised there and I can click on it and run it. Does anyone know of a way to run this in such a way that it will still be managed by Citrix? Thanks, Art Hi Art, if you right click the app in your Citrix Neighborhood you can
choose Create Desktop Shortcut, if you then right click the shortcut on the desktop you can see the shortcuts' target and the shortcut start in directory. Next you can use this info to start up the program the same way as citrix would by using a Process and ProcessStartinfo in vb.net For example Dim myProc As New Process Dim myPsi As New ProcessStartInfo 'this is the info like it is in my desktop shortcut 'Target: "C:\Program Files\Citrix\ICA Client\pn.exe" /APP "Profelmenu" /PNI "8a0f5291" 'Start in: "C:\Program Files\Citrix\ICA Client" myPsi.FileName = "C:\Program Files\Citrix\ICA Client\pn.exe" 'First part of the "target" part from the shortcut myPsi.Arguments = "/APP ""Profelmenu"" /PNI ""8a0f5291""" 'Second part of the "target" part from the shortcut myPsi.WorkingDirectory = "C:\Program Files\Citrix\ICA Client" 'The "start in" part of the shortcut myProc.Start(myPsi) hope this helps, Greetz PEter -- Show quoteHide quoteProgramming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. (Rich Cook) "Art" <A**@discussions.microsoft.com> schreef in bericht news:0848FC2E-2AE7-4479-88B4-198EBC9D0754@microsoft.com... > Hi, > > We have some applications that run on a Citrix server. I would like to run > one of them, a reporting app, from within a VB.net application. > > If I log into the Citrix server with remote desktop, I can type a command > line that will do what I want. My VB.net application is not on that Citrix > server. I'm afraid that if I map a drive to the Citrix box and shell out to > the reporting app that I'll take it over -- that is, my use of the > application won't be managed by Citrix. > > I normally access the reporting app by running a "Citrix Neighborhood" on my > desktop. The app is publised there and I can click on it and run it. > > Does anyone know of a way to run this in such a way that it will still be > managed by Citrix? > > Thanks, > > Art Peter,
Two things... First -- why didn't I think of a desktop shortcut? Second, and this may cancel our the first -- I've never seen any of the stuff in your code. I'll try it out and no doubt learn a whole bunch of useful stuff. Thanks very much, Art Show quoteHide quote "Peter Proost" wrote: > Hi Art, if you right click the app in your Citrix Neighborhood you can > choose Create Desktop Shortcut, if you then right click the shortcut on the > desktop you can see the shortcuts' target and the shortcut start in > directory. Next you can use this info to start up the program the same way > as citrix would by using a Process and ProcessStartinfo in vb.net > > For example > > Dim myProc As New Process > Dim myPsi As New ProcessStartInfo > 'this is the info like it is in my desktop shortcut > 'Target: "C:\Program Files\Citrix\ICA Client\pn.exe" /APP > "Profelmenu" /PNI "8a0f5291" > 'Start in: "C:\Program Files\Citrix\ICA Client" > myPsi.FileName = "C:\Program Files\Citrix\ICA Client\pn.exe" 'First > part of the "target" part from the shortcut > myPsi.Arguments = "/APP ""Profelmenu"" /PNI ""8a0f5291""" 'Second > part of the "target" part from the shortcut > myPsi.WorkingDirectory = "C:\Program Files\Citrix\ICA Client" 'The > "start in" part of the shortcut > myProc.Start(myPsi) > > hope this helps, > > Greetz PEter > > -- > Programming today is a race between software engineers striving to build > bigger and better idiot-proof programs, and the Universe trying to produce > bigger and better idiots. So far, the Universe is winning. (Rich Cook) > > "Art" <A**@discussions.microsoft.com> schreef in bericht > news:0848FC2E-2AE7-4479-88B4-198EBC9D0754@microsoft.com... > > Hi, > > > > We have some applications that run on a Citrix server. I would like to > run > > one of them, a reporting app, from within a VB.net application. > > > > If I log into the Citrix server with remote desktop, I can type a command > > line that will do what I want. My VB.net application is not on that > Citrix > > server. I'm afraid that if I map a drive to the Citrix box and shell out > to > > the reporting app that I'll take it over -- that is, my use of the > > application won't be managed by Citrix. > > > > I normally access the reporting app by running a "Citrix Neighborhood" on > my > > desktop. The app is publised there and I can click on it and run it. > > > > Does anyone know of a way to run this in such a way that it will still be > > managed by Citrix? > > > > Thanks, > > > > Art > > > Hi the code isn't that complex if you go by it step by step
'First we declare a new Process and ProcessStartInfo, you can use ProcessStartInfo to provide the process more info about 'what and where to start. Dim myProc As New Process Dim myPsi As New ProcessStartInfo 'We provide the processStartInfo the path to the exe to start myPsi.FileName = "C:\Program Files\Citrix\ICA Client\pn.exe" 'First 'Next we provide the startup arguments for the exe myPsi.Arguments = "/APP ""Profelmenu"" /PNI ""8a0f5291""" 'Second 'Then we pass the workingdirectory myPsi.WorkingDirectory = "C:\Program Files\Citrix\ICA Client" 'The 'Finally we say start a process based on the processStartInfo myProc.Start(myPsi) Greetz Peter -- Show quoteHide quoteProgramming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. (Rich Cook) "Art" <A**@discussions.microsoft.com> schreef in bericht news:B8E2190A-2938-493E-ABA7-8C6C80212D32@microsoft.com... > Peter, > > Two things... > > First -- why didn't I think of a desktop shortcut? > Second, and this may cancel our the first -- I've never seen any of the > stuff in your code. I'll try it out and no doubt learn a whole bunch of > useful stuff. > > Thanks very much, > > Art > > "Peter Proost" wrote: > > > Hi Art, if you right click the app in your Citrix Neighborhood you can > > choose Create Desktop Shortcut, if you then right click the shortcut on the > > desktop you can see the shortcuts' target and the shortcut start in > > directory. Next you can use this info to start up the program the same way > > as citrix would by using a Process and ProcessStartinfo in vb.net > > > > For example > > > > Dim myProc As New Process > > Dim myPsi As New ProcessStartInfo > > 'this is the info like it is in my desktop shortcut > > 'Target: "C:\Program Files\Citrix\ICA Client\pn.exe" /APP > > "Profelmenu" /PNI "8a0f5291" > > 'Start in: "C:\Program Files\Citrix\ICA Client" > > myPsi.FileName = "C:\Program Files\Citrix\ICA Client\pn.exe" 'First > > part of the "target" part from the shortcut > > myPsi.Arguments = "/APP ""Profelmenu"" /PNI ""8a0f5291""" 'Second > > part of the "target" part from the shortcut > > myPsi.WorkingDirectory = "C:\Program Files\Citrix\ICA Client" 'The > > "start in" part of the shortcut > > myProc.Start(myPsi) > > > > hope this helps, > > > > Greetz PEter > > > > -- > > Programming today is a race between software engineers striving to build > > bigger and better idiot-proof programs, and the Universe trying to produce > > bigger and better idiots. So far, the Universe is winning. (Rich Cook) > > > > "Art" <A**@discussions.microsoft.com> schreef in bericht > > news:0848FC2E-2AE7-4479-88B4-198EBC9D0754@microsoft.com... > > > Hi, > > > > > > We have some applications that run on a Citrix server. I would like to > > run > > > one of them, a reporting app, from within a VB.net application. > > > > > > If I log into the Citrix server with remote desktop, I can type a command > > > line that will do what I want. My VB.net application is not on that > > Citrix > > > server. I'm afraid that if I map a drive to the Citrix box and shell out > > to > > > the reporting app that I'll take it over -- that is, my use of the > > > application won't be managed by Citrix. > > > > > > I normally access the reporting app by running a "Citrix Neighborhood" on > > my > > > desktop. The app is publised there and I can click on it and run it. > > > > > > Does anyone know of a way to run this in such a way that it will still be > > > managed by Citrix? > > > > > > Thanks, > > > > > > Art > > > > > > Peter,
I tried your suggestion and it did successfully launch the Citrix App. I know have a followup problem. There are 3 parameters I need to pass to the reporting app -- user ID, password and a report file. I can do this on a command line by: appname.exe -user xxxx -password xxxx report.rrr When I use the shortcut as you described, I can't find a way to do this. I did find that I needed to change what you had sent me slightly: myProc.StartInfo=myPsi myProc.Start I then noticed all kinds of methods and properties for myProc. I thought maybe somwthing using the window handler would let me fill in the ID and password. Although this wouldn't let me get the report name in there. The ideal solution would be to be able to use something that looks like the command line that I would use to start the application. Do you have any suggestions for that? Even if not, I want to thank you for the help you've already given me. Art Show quoteHide quote "Peter Proost" wrote: > Hi Art, if you right click the app in your Citrix Neighborhood you can > choose Create Desktop Shortcut, if you then right click the shortcut on the > desktop you can see the shortcuts' target and the shortcut start in > directory. Next you can use this info to start up the program the same way > as citrix would by using a Process and ProcessStartinfo in vb.net > > For example > > Dim myProc As New Process > Dim myPsi As New ProcessStartInfo > 'this is the info like it is in my desktop shortcut > 'Target: "C:\Program Files\Citrix\ICA Client\pn.exe" /APP > "Profelmenu" /PNI "8a0f5291" > 'Start in: "C:\Program Files\Citrix\ICA Client" > myPsi.FileName = "C:\Program Files\Citrix\ICA Client\pn.exe" 'First > part of the "target" part from the shortcut > myPsi.Arguments = "/APP ""Profelmenu"" /PNI ""8a0f5291""" 'Second > part of the "target" part from the shortcut > myPsi.WorkingDirectory = "C:\Program Files\Citrix\ICA Client" 'The > "start in" part of the shortcut > myProc.Start(myPsi) > > hope this helps, > > Greetz PEter > > -- > Programming today is a race between software engineers striving to build > bigger and better idiot-proof programs, and the Universe trying to produce > bigger and better idiots. So far, the Universe is winning. (Rich Cook) > > "Art" <A**@discussions.microsoft.com> schreef in bericht > news:0848FC2E-2AE7-4479-88B4-198EBC9D0754@microsoft.com... > > Hi, > > > > We have some applications that run on a Citrix server. I would like to > run > > one of them, a reporting app, from within a VB.net application. > > > > If I log into the Citrix server with remote desktop, I can type a command > > line that will do what I want. My VB.net application is not on that > Citrix > > server. I'm afraid that if I map a drive to the Citrix box and shell out > to > > the reporting app that I'll take it over -- that is, my use of the > > application won't be managed by Citrix. > > > > I normally access the reporting app by running a "Citrix Neighborhood" on > my > > desktop. The app is publised there and I can click on it and run it. > > > > Does anyone know of a way to run this in such a way that it will still be > > managed by Citrix? > > > > Thanks, > > > > Art > > > Hi,
I won't be at work for a couple of days so I can't realy test anything, but I think that you can specify command line parameters when you publish an app on citrix, so I would publish the app with the parameters you need, then again create a desktop shortcut and check it's properties to see how the info get's passed to the app. I guess you probably need to add something to the myPsi.Arguments = "/APP ""Profelmenu"" /PNI ""8a0f5291""" piece of code I hope this helps, greetz Peter Show quoteHide quote "Art" <A**@discussions.microsoft.com> schreef in bericht news:EEFC80EC-F3F7-4B92-B8A4-CA3524E6287E@microsoft.com... > Peter, > > I tried your suggestion and it did successfully launch the Citrix App. I > know have a followup problem. There are 3 parameters I need to pass to the > reporting app -- user ID, password and a report file. I can do this on a > command line by: > > appname.exe -user xxxx -password xxxx report.rrr > > When I use the shortcut as you described, I can't find a way to do this. I > did find that I needed to change what you had sent me slightly: > myProc.StartInfo=myPsi > myProc.Start > > I then noticed all kinds of methods and properties for myProc. I thought > maybe somwthing using the window handler would let me fill in the ID and > password. Although this wouldn't let me get the report name in there. > > The ideal solution would be to be able to use something that looks like the > command line that I would use to start the application. > > Do you have any suggestions for that? > > Even if not, I want to thank you for the help you've already given me. > > Art > > > > "Peter Proost" wrote: > > > Hi Art, if you right click the app in your Citrix Neighborhood you can > > choose Create Desktop Shortcut, if you then right click the shortcut on the > > desktop you can see the shortcuts' target and the shortcut start in > > directory. Next you can use this info to start up the program the same way > > as citrix would by using a Process and ProcessStartinfo in vb.net > > > > For example > > > > Dim myProc As New Process > > Dim myPsi As New ProcessStartInfo > > 'this is the info like it is in my desktop shortcut > > 'Target: "C:\Program Files\Citrix\ICA Client\pn.exe" /APP > > "Profelmenu" /PNI "8a0f5291" > > 'Start in: "C:\Program Files\Citrix\ICA Client" > > myPsi.FileName = "C:\Program Files\Citrix\ICA Client\pn.exe" 'First > > part of the "target" part from the shortcut > > myPsi.Arguments = "/APP ""Profelmenu"" /PNI ""8a0f5291""" 'Second > > part of the "target" part from the shortcut > > myPsi.WorkingDirectory = "C:\Program Files\Citrix\ICA Client" 'The > > "start in" part of the shortcut > > myProc.Start(myPsi) > > > > hope this helps, > > > > Greetz PEter > > > > -- > > Programming today is a race between software engineers striving to build > > bigger and better idiot-proof programs, and the Universe trying to produce > > bigger and better idiots. So far, the Universe is winning. (Rich Cook) > > > > "Art" <A**@discussions.microsoft.com> schreef in bericht > > news:0848FC2E-2AE7-4479-88B4-198EBC9D0754@microsoft.com... > > > Hi, > > > > > > We have some applications that run on a Citrix server. I would like to > > run > > > one of them, a reporting app, from within a VB.net application. > > > > > > If I log into the Citrix server with remote desktop, I can type a command > > > line that will do what I want. My VB.net application is not on that > > Citrix > > > server. I'm afraid that if I map a drive to the Citrix box and shell out > > to > > > the reporting app that I'll take it over -- that is, my use of the > > > application won't be managed by Citrix. > > > > > > I normally access the reporting app by running a "Citrix Neighborhood" on > > my > > > desktop. The app is publised there and I can click on it and run it. > > > > > > Does anyone know of a way to run this in such a way that it will still be > > > managed by Citrix? > > > > > > Thanks, > > > > > > Art > > > > > > |
|||||||||||||||||||||||