星期三, 7月 30, 2008

Logon Script

Logon Scipt 中 對機名mount 唔同ge printer


net time \\filerserver /set /y
net use s: \\filerserver\stud$ /y


if /I "%computername:~0,4%"=="ITED" goto ITED
if /I "%computername:~0,4%"=="COMP" goto CP211
if /I "%computername:~0,4%"=="MMLC" goto MMLC
goto EXIT

:ITED
net use z: \\itedfile\Student$ /y
con2prt /cd \\ited_tech\hp4050
con2prt /c \\ited_tech\hp920c
goto EXIT

:CP211
con2prt /cd \\mmlc\hp4050
con2prt /c \\mmlc\HP670C
goto EXIT

:MMLC
net use i: \\mmlc\student /y
net use j: \\mmlc\teaching /y
con2prt /cd \\mmlc\hp4200
con2prt /c \\mmlc\mmlcCP
goto EXIT