How can I launch more than one application on a remote TS server and wait until they all exit before logging out of TS session ?
To keep things running a new scripting command called "alsowaiton" was added.
You just pass in the name of another process that it should also wait for before quitting.
In the examples below (which show 3 ways you can do this), I have wnssoclient.exe launch notepad. Then I manually was starting calc (to simulate app1 launching app2). wnSSOClient will not shut down until both apps are done.
SIMPLE SCRIPTING
wnssoclient.exe "{app:notepad}|{alsowaiton:calc}|{notimeout}"
XML SCRIPTING (using mainscript)
wnssoclient.exe "<ssoscript><app>notepad</app><mainscript>{alsowaiton:calc}|{notimeout}</mainscript></ssoscript>"
XML SCRIPTING (specify alsowaiton in xml rather than in mainscript)
wnssoclient.exe "<ssoscript><app>notepad</app><alsowaiton>calc</alsowaiton><mainscript>{notimeout}</mainscript></ssoscript>"
Some times an application will launch, spawn another process and close the first one.
Internet Explorer acts like this.
To do Internet Explorer :
Set your start program for iexplore.exe
Pass in the url you want to launch as a parameter
Then for the sso script use :
{alsowaiton:iexplore}|{logoffonexit}|{notimeout}
This will wait for iexplore to finish before issuing a logoff.
The reason for this is that based on some settings for IE, it launches itself and then launches another sub process for the site you want to browse to. This double launch causes wnssoclient to think you finished with iexplore.exe and logs you off.
The alsowaiton:iexplore tells it to wait for another iexplore to finish before shutting down.
To pass in a URL to have open when IE launches, put http://www.google.com as the parameter to send to iexplore.exe in the webapp.
** Note you need to use the process name not the executable like notepad.exe. Many times the process name is just the name of the executable without the .exe. You can use the cmd tasklist to dump all of the running programs on the machine and try the name listed in the "image name" column without the .exe