SMS使用時のログインスクリプトのサンプル
@echo off
echo Connecting Drive I: to the ... ----- ネットワークドライブのローカルへの接続
NET USE I: ....
set SMSSRV=smssrv1 ----- SMSのログインサーバの設定
:CHECKRAS ----- RASクライアントかのチェック
\\%SMSSRV%\TOOLS\CHECKRAS.exe > nul
if errorlevel 1 goto END ----- RASクライアントならSMSの処理をスキップ
REM normal logon steps here ...
if not "%OS%" == "Windows_NT" goto SMSWIN95 ----- OSのチェック
echo Adding the SMS Service account to your Administrators Group...
----- NTならSMSのサービスアカウントをローカルのAdministratorsグループに追加
net localgroup Administrators domain\smsadmin /add
set LOGSRV=%LOGONSERVER%\NETLOGON
----- NTならSMSサービスアカウントにサービスとしてログインの権利を追加
\\%SMSSRV%\TOOLS\ntrights.exe +r SeServiceLogonRight -u domain\smsadmin
goto SMSINSTALL
:SMSWIN95
:SMSINSTALL
----- SMSの処理
call \\%SMSSRV%\SMS_SHR\RUNSMS.BAT
:END