0

I have a test server running on Windows XP SP3.

I need to do the following:

  1. Boot
  2. Automatically login WWW user
  3. Start a WWW server (I'm using IIS Express)
  4. 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.

bbmelo
  • 11
  • 1

2 Answers2

1

I solved my own problem.

The way to go, cleaner and lighter, is to setup a Scheduled Task for start IIS Express script (B).

bbmelo
  • 11
  • 1
0

Regardless of whether you get the script working or not, Windows XP allows for only one user session at a time so there's no way (that I know of) to have a disconnected user session and allow another user session at the same time.

joeqwerty
  • 108,377
  • 6
  • 80
  • 171
  • Yes, that's true, but Win XP supports Fast User Switching which allows for a user to disconnect leaving its processes running. There can be many users logged but only one ACTIVE user. – bbmelo Apr 01 '11 at 12:13