Hi,
I am in the process of creating my own home network, and started writting a logon script in the old batch langugge and I want to translate it to VBscript because I understand that as it's a newer langugge it is capable of doing much more complex things. So could someone translate this whole script for me in vbscript.
Thanks
I am in the process of creating my own home network, and started writting a logon script in the old batch langugge and I want to translate it to VBscript because I understand that as it's a newer langugge it is capable of doing much more complex things. So could someone translate this whole script for me in vbscript.
Thanks
Code:
@echo off
echo ------------------------------------------------------------
echo The Denny Network Logon Script 2005 version 1.0
echo ------------------------------------------------------------
REM **** Display Welcome Messages ****
echo Welcome To The Denny Network!
echo You Are On %COMPUTERNAME%, And You Are Running %os%
echo ------------------------------------------------------------
echo Starting Logon Script ...
echo ------------------------------------------------------------
REM **** Main Logon script ****
echo Hello %USERNAME%, Now Loading Your Persanal Settings...
echo Please Wait While This Script Runs...
echo You Will Be Logged On Shortly...
echo ------------------------------------------------------------
echo Refreshing Network Drives...
net use I: /delete
net use S: /delete
net use P: /delete
echo Mapping Network Drives...
NET USE I: \\LEONSPC\home
NET USE S: \\LEONSPC\SharedDocs
NET USE P: \\LEONSPC\Shared
echo ------------------------------------------------------------
echo Copying Files...
IF "%USERNAME%" == "Leon" GOTO :Lcopy
IF "%USERNAME%" == "Nipsi" GOTO :Ncopy
IF "%USERNAME%" == "Chrisi" GOTO :Ccopy
:Lcopy
xcopy "P:\Shared.lnk" "\\leonspc\Users\Leon.LEONSPC\desktop" /c /k /r /i /q /y
xcopy "S:\SharedDocs.lnk" "\\leonspc\Users\Leon.LEONSPC\desktop" /c /k /r /i /q /y
GOTO :printersetup
:Ncopy
xcopy "P:\Shared.lnk" "\\leonspc\Users\Nipsi\desktop" /c /k /r /i /q /y
xcopy "S:\SharedDocs.lnk" "\\leonspc\Users\Leon.LEONSPC\desktop" /c /k /r /i /q /y
GOTO :printersetup
:Ccopy
xcopy "P:\Shared.lnk" "\\leonspc\Users\Chrisi\desktop" /c /k /r /i /q /y
xcopy "S:\SharedDocs.lnk" "\\leonspc\Users\Leon.LEONSPC\desktop" /c /k /r /i /q /y
GOTO :printersetup
:printersetup
echo ------------------------------------------------------------
IF "%COMPUTERNAME%" == "LEONSPC" GOTO :PrintersOnLeonspc
IF "%COMPUTERNAME%" == "NIPSI" GOTO :PrintersOnNipsi
:PrintersOnNipsi
echo Connecting To HP OfficeJet 2110 (Nipsi's Printer)...
rundll32 printui.dll,PrintUIEntry /in /n \\Nipsi\OfficeJet2110 /y
echo Connecting To HP LaserJet 2100 (Leon's Printer)...
rundll32 printui.dll,PrintUIEntry /in /n \\Leonspc\LaserJet2100
echo Connecting To HP DeskJet 3650 (Leon's Printer)...
rundll32 printui.dll,PrintUIEntry /in /n \\Leonspc\DeskJet3650
GOTO :logon
:PrintersOnLeonspc
echo Connecting To HP LaserJet 2100 (Leon's Printer)...
rundll32 printui.dll,PrintUIEntry /in /n \\Leonspc\LaserJet2100 /y
echo Connecting To HP DeskJet 3650 (Leon's Printer)...
rundll32 printui.dll,PrintUIEntry /in /n \\Leonspc\DeskJet3650
GOTO :logon
:logon
echo ------------------------------------------------------------
echo Finished! Thanks For Your Patience
echo You Are Now Being Logged On To This Computer...
echo ------------------------------------------------------------
echo Network Managed And Created by Leon Denny 2005
GOTO :DONE
:DONE