• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4860
  • Last Modified:

what does usrlogon.cmd do in wins 2003 server?

Hi Experts,

I have seen usrlogon.cmd script in wins 2003 box, but not sure what does it do in the server ?

In the code, It mentions about usrlogn1.cmd and usrlogn2.cmd but I don't see them exit in \system32 folder !?

Thanks.
@Echo Off
 
Call "%SystemRoot%\Application Compatibility Scripts\SetPaths.Cmd"
If "%_SETPATHS%" == "FAIL" Goto Done
 
Rem
Rem This is for those scripts that don't need the RootDrive.
Rem
 
If Not Exist "%SystemRoot%\System32\Usrlogn1.cmd" Goto cont0
Cd /d "%SystemRoot%\Application Compatibility Scripts\Logon"
Call "%SystemRoot%\System32\Usrlogn1.cmd"
 
:cont0
 
Rem
Rem Determine the user's home directory drive letter.  If this isn't
Rem set, exit.
Rem
 
Cd /d %SystemRoot%\"Application Compatibility Scripts"
Call RootDrv.Cmd
If "A%RootDrive%A" == "AA" End.Cmd
 
Rem
Rem Map the User's Home Directory to a Drive Letter
Rem
 
Net Use %RootDrive% /D >NUL: 2>&1
Subst %RootDrive% "%HomeDrive%%HomePath%"
if ERRORLEVEL 1 goto SubstErr
goto AfterSubst
:SubstErr
Subst %RootDrive% /d >NUL: 2>&1
Subst %RootDrive% "%HomeDrive%%HomePath%"
:AfterSubst
 
Rem
Rem Invoke each Application Script.  Application Scripts are automatically
Rem added to UsrLogn2.Cmd when the Installation script is run.
Rem
 
If Not Exist %SystemRoot%\System32\UsrLogn2.Cmd Goto Cont1
 
Cd Logon
Call %SystemRoot%\System32\UsrLogn2.Cmd
 
:Cont1
 
:Done

Open in new window

0
SJCA
Asked:
SJCA
2 Solutions
 
pfcjokerCommented:
It is a command file that is run anytime a user connects to a server over RDP or Citrix. By default it maps stuff such as the users TSHomedir from their AD account etc.

In most situations it's best to leave it alone. Though an advanced Citrix admin routinely uses it to process RDP/Citrix only commands on a per user basis (such as maybe drive mappings not defined in GPOs Login scripts, etc).

the userlognx items are dynamic some installs use them to continue a process after reboot, though most use registry now a days, it's more of a legacy support thing.
0
 
Carl WebsterCommented:
This will explain usrlogon.cmd, usrlogon1.cmd, usrlogon2.cmd, application compatibility scripts and the flow of usrlogon.cmd.

http://msdn.microsoft.com/en-us/library/ms811520.aspx
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now