I have a test server running on Windows XP SP3.
I need to do the following:
- Boot
- Automatically login WWW user
- Start a WWW server (I'm using IIS Express)
- Disconnect (not logout) the WWW user (maybe using the tsdiscon command)
This will allow to keep a test site always online while other user (in turn) may connect to the machine using different usernames through Remote Desktop.
I have setup 3 bat scripts:
Script A (located at Startup folder):
@echo off
start "IIS Express" /min cmd.exe /k "C:\Documents and Settings\WWW\My Documents\IISExpress\scripts\StartIisExpress.bat"
start "Disconnect User" /min cmd.exe /k "C:\Documents and Settings\WWW\My Documents\IISExpress\scripts\DisconnectUser.bat"
Script B:
"C:\Program Files\IIS Express\iisexpress.exe" /config:"C:\Documents and Settings\WWW\My Documents\IISExpress\config\applicationhost.config" > NUL
Script C:
tsdiscon
Every thing works as expected until it reaches the tsdiscon script. I returns an error message:
Could not get the current sessionname, Error code 1702.
The binding handle is invalid.
Obviously the WWW user doesn't get disconnects but if I type tsdiscon and press Enter manually it will work as expected.
Any hints on this? I would really appreciate your help.