mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1012 B
50 lines
1012 B
@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
|