Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pass arguments to a published application 1

Status
Not open for further replies.

mlowe9

Programmer
Apr 3, 2002
221
US
Is there any way to pass arguments to a published application through an ica file?

For example, in the line of the ica file that calls the published app:
InitialProgram=#mypublishedapp

could I add an argument:
InitialProgram=#mypublishedapp "
and specify that switch in the published application settings under the application location tab under the Command Line section?

Thanks
Matt
"c:\program files\internet explorer\iexplore.exe" %arg1%
 
no just publish the app with the command line

[blue] Oh you know, just doing what I do.[/blue]

Cheers
Scott
 
That won't do what I need it to, but I guess the "no" answers my question. Thanks
 
There are places where I have had to publish a lot of apps with arguements on them. Its a pain but it can work.

[blue] Oh you know, just doing what I do.[/blue]

Cheers
Scott
 
I probably cannot do what I want to do, but I was reaching...
Maybe if I explain you'll understand.

I need to pass the argument (which will change from user to user) from the .ica file to the published application, then pass that argument to the command-line of the published application.

I am creating the .ica file on-the-fly for the user when they call a certain script that I've written. For example, if I want to pass the username to the published app. I can't put that in the command-line, because it won't be the same for everyone. But if I could pass an arg in the .ica to the published app, then THAT would work.

Does that help?
 
Ok yes I understand now. Difficult.

Is the arguement variable or static ? I will the agrument change for a user from time to time ? In which case you could probably write a script to fire up the app with info you need. Kix or VB or something like that.

I am guessing here, but I have some convoluted published apps out there, its the fun bit.

[blue] Oh you know, just doing what I do.[/blue]

Cheers
Scott
 
Sorry, what I meant is to get some to run is sometimes fun.

For example, one of my sites has lots of old novell stuff. This is traditionally bad karma in a citrix environment, logins and passwords and stuff. So I have a few scripts that when I can't produce consistent interfaces, I script them. Like drive mappings using description from the user mangler as thir context etc. I also have some apps that need to have agruements to them like Great Plains or the likes. I am not saying that you will get it to work, just might have to think out the box a wee bit.

What I try to do is get it working from a dos command line. If you can do that you can script it.

[blue] Oh you know, just doing what I do.[/blue]

Cheers
Scott
 
Try having a look at this

Passing Parameters to Published Applications

When you associate a published application with file types, Presentation Server appends the symbols “%*” (percent and star symbols enclosed in double quotation marks) to the end of the application’s command line. These symbols act as a placeholder for client-passed parameters.
If a published application doesn’t launch when expected, verify that its command line contains the symbols cited above. If you do not see these symbols in an application’s command line, you can add them manually.
If the path to the application’s executable file includes directory names with spaces (such as “C:\Program Files”), you must enclose the command line for the application in double quotation marks to indicate that the space belongs in the command line.
To do this, follow the instructions below for adding quotation marks around the %* symbols and then add a double quotation mark at the beginning and the end of the command line. Be sure to include a space between the closing quotation mark for the command line and the opening quotation mark for the %* symbols.
For example, change the command line for the published application Windows Media Player to the following:
“C:\Program Files\Windows Media Player\mplayer1.exe” “%*”
The following procedures assume you want to add the symbols to the Notepad application, which is published on a Presentation Server.

To add a parameter placeholder to a published application
1. In the Presentation Server Console, expand the Applications node. Select the application to use and choose Properties.

2. In the Properties dialog box, select the Application Location tab.

3. In the Command Line box, add a space and “%*” (percent and star symbols enclosed in quotation marks) to the end of the command line. For example, for the following command line:

%SystemRoot%\System32\Notepad.exe
Add “%*” to the end, as follows: %SystemRoot%\System32\Notepad.exe “%*”

4. Choose OK to save the changes.




[blue] Oh you know, just doing what I do.[/blue]

Cheers
Scott
 
Very nice. I will see if I can make that fit my situation. Thank you very much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top