Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: what does this mean?  (Read 3786 times)

0 Members and 1 Guest are viewing this topic.

dickbtrain

  • Guest
what does this mean?
« on: October 31, 2005, 10:54:40 AM »
hey heres the text from a batch file i obtained from a school comp.Can anyone tell me what it means.


@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

Sidewinder



    Guru

    Thanked: 139
  • Experience: Familiar
  • OS: Windows 10
Re: what does this mean?
« Reply #1 on: October 31, 2005, 02:01:08 PM »
Looks like a logon script. The script calls some external cmd files which apparently set various variables which are then tested in the mainline script. Some of the variables (enclosed with %) are system environment variables (%systemroot%, %homedrive%, %homepath% etc) and some are generated by the external files (%_setpaths%, %rootdrive%, etc).

Without seeing the external files, it's difficult to see exactly what's happening but I'm guessing it just does some housekeeping for each user when they logon to their machine.

Did you have a specific question about this file? As for the meaning of the file, I'll leave that to the philosphers.

8)
The true sign of intelligence is not knowledge but imagination.

-- Albert Einstein

GX1_Man

  • Guest
Re: what does this mean?
« Reply #2 on: November 01, 2005, 07:02:30 AM »
Quote
As for the meaning of the file, I'll leave that to the philosphers.



LOL  ;D