Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers

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
add comment

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
add comment

Your Answer

 
discard

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.