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 would like to know if there is a per-user version of %SystemRoot%\System32\login.cmd available? The default login.cmd file contains comments hinting towards this, but I can't find anything about it anywhere else.

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

To my knowledge, the Win32 TELNET server doesn't actually try and execute per-user logon scripts. Tracing it out with Process Monitor on a PC with the TELNET server enabled and a logon script specified on the user with "NET USER xxx /scriptpath:script.bat" seems to confirm, but I certainly didn't give it a thorough examination.

It appears that the Services for Unix TELNET server does execute per-user logon scripts (see http://support.microsoft.com/kb/278389), but I don't know that I'd want to go through that kind of headache.

What would I do? I'd add some stuff like this into logon.cmd:

@echo off
rem
rem  Default global login script for the Telnet Server
rem
rem  In the default setup, this command script is executed when the
rem  initial command shell is invoked.  It, in turn, will try to invoke
rem  the individual user's login script.
rem

IF EXIST "C:\LOGON_SCRIPTS\%USERNAME%.CMD" CALL C:\LOGIN_SCRIPTS\%USERNAME%.CMD

:end
echo *===============================================================
echo Welcome to Microsoft Telnet Server.
echo *===============================================================

cd /d %HOMEDRIVE%\%HOMEPATH%

Then I'd just throw per-user logon scripts into that C:\LOGON_SCRIPTS folder, named for the user's account. If there's no file for a user, nothing happens. It's kinda cheap, but it'll work. (I owe my success in IT to finding cheap but effective ways to get things done fast... >smile<)

share|improve this answer
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.