469,317 Members | 1,774 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,317 developers. It's quick & easy.

Run a Citrix App

Art
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
Feb 23 '06 #1
5 10699
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" <Ar*@discussions.microsoft.com> schreef in bericht
news:08**********************************@microsof t.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

Feb 23 '06 #2
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

"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" <Ar*@discussions.microsoft.com> schreef in bericht
news:08**********************************@microsof t.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


Feb 24 '06 #3
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
--
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" <Ar*@discussions.microsoft.com> schreef in bericht
news:B8**********************************@microsof t.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" <Ar*@discussions.microsoft.com> schreef in bericht
news:08**********************************@microsof t.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


Feb 24 '06 #4
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

"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" <Ar*@discussions.microsoft.com> schreef in bericht
news:08**********************************@microsof t.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


Feb 24 '06 #5
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

"Art" <Ar*@discussions.microsoft.com> schreef in bericht
news:EE**********************************@microsof t.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" <Ar*@discussions.microsoft.com> schreef in bericht
news:08**********************************@microsof t.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


Feb 27 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Rob | last post: by
7 posts views Thread by SK | last post: by
7 posts views Thread by Paul | last post: by
4 posts views Thread by Peter | last post: by
12 posts views Thread by =?Utf-8?B?QXJ0?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.