moinuddin_sh Posted December 18, 2006 Posted December 18, 2006 I run a batch file to update the Antivirus DAT file on each computer on my Domain 2003 network, whenever a user login to a computer. Now I want to replace this bat with script file. What should I add in my script to run DAT file whenever a user login.Regards
cluberti Posted December 18, 2006 Posted December 18, 2006 I'm confused - you want to replace a .bat or .cmd file with a .vbs script, is that correct?
moinuddin_sh Posted December 19, 2006 Author Posted December 19, 2006 I have a batch file created by me to update the new antivirus DAT files that I want to replace with one addition line in my following login script.' VBScript.' Mapping user home folder on the serverDim oNet, sUser, sDeptSet oNet = CreateObject("Wscript.Network")sUser =oNet.UserNamesDept =oNet.DeptoNet.MapNetworkDrive "P:", "\\Server01\" & sUser 'Mapping Network Attached Drives'Dim WshNetwork'Set WshNetwork = WScript.CreateObject("WScript.Network")'WshNetwork.MapNetworkDrive "M:", "\\Server01\CMT"'WshNetwork.MapNetworkDrive "Q:", "\\Server01\Public Folder"'WshNetwork.MapNetworkDrive "S:", "\\Server01\Share"'WshNetwork.MapNetworkDrive "W:", "\\Server01\Course"'WshNetwork.MapNetworkDrive "Z:", "\\Server01\CopyScan"'Mapping Network Attached PrintersDim netSet net = CreateObject("WScript.Network") net.AddWindowsPrinterConnection Lpt1: \\Server01\HPLaserJetAccount'Selecting default printerSet net = CreateObject("WScript.Network") net.SetDefaultPrinter "\\Server01\HPLaserJetAccount"
LLXX Posted December 20, 2006 Posted December 20, 2006 If there's nothing that the batch file can't do, then I suggest you continue to use a batch file instead of a script.
moinuddin_sh Posted December 21, 2006 Author Posted December 21, 2006 I found the VB script that can autoupdate the antivirus through login script.Thanks to everyone.
moinuddin_sh Posted December 23, 2006 Author Posted December 23, 2006 Here is the VB script that I added in my existing login script file. There is only one issue is there how can I run the update in Slient mode. When I add /Silent switch the did not work.Dim oShellSet oShell = WScript.CreateObject ("WSCript.shell")oShell.run "\\Server01\Mcafee\sdatnew.exe"Set oShell = NothingIf I use the silent switch as mentioned below then the script does not work.Dim oShellSet oShell = WScript.CreateObject ("WSCript.shell")oShell.run "\\Server01\Mcafee\sdatnew.exe /Silent"Set oShell = Nothing
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now