Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:


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.

share|improve this question

I solved my own problem.

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

share|improve this answer

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.

share|improve this answer
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 1 '11 at 12:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.