51 lines
998 B
Batchfile
51 lines
998 B
Batchfile
@Echo Off
|
|
|
|
Call "%SystemRoot%\Application Compatibility Scripts\SetPaths.Cmd"
|
|
If "%_SETPATHS%" == "FAIL" Goto Done
|
|
|
|
Rem
|
|
Rem 这是针对不需要 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 决定用户的主目录驱动器号。如果没有
|
|
Rem 设置,则退出。
|
|
Rem
|
|
|
|
Cd /d %SystemRoot%\"Application Compatibility Scripts"
|
|
Call RootDrv.Cmd
|
|
If "A%RootDrive%A" == "AA" End.Cmd
|
|
|
|
Rem
|
|
Rem 将用户的主目录映射到驱动器号
|
|
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 调用每个应用程序脚本。运行安装脚本时,
|
|
Rem 应用程序脚本被自动添加到 UsrLogn2.Cmd。
|
|
Rem
|
|
|
|
If Not Exist %SystemRoot%\System32\UsrLogn2.Cmd Goto Cont1
|
|
|
|
Cd Logon
|
|
Call %SystemRoot%\System32\UsrLogn2.Cmd
|
|
|
|
:Cont1
|
|
|
|
:Done
|