Jump to content

Update Antivirus DAT file through login script


Recommended Posts


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 server

Dim oNet, sUser, sDept

Set oNet = CreateObject("Wscript.Network")

sUser =oNet.UserName

sDept =oNet.Dept

oNet.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 Printers

Dim net

Set net = CreateObject("WScript.Network")

net.AddWindowsPrinterConnection Lpt1: \\Server01\HPLaserJetAccount

'Selecting default printer

Set net = CreateObject("WScript.Network")

net.SetDefaultPrinter "\\Server01\HPLaserJetAccount"

Link to comment
Share on other sites

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 oShell

Set oShell = WScript.CreateObject ("WSCript.shell")

oShell.run "\\Server01\Mcafee\sdatnew.exe"

Set oShell = Nothing

If I use the silent switch as mentioned below then the script does not work.

Dim oShell

Set oShell = WScript.CreateObject ("WSCript.shell")

oShell.run "\\Server01\Mcafee\sdatnew.exe /Silent"

Set oShell = Nothing

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.


×
×
  • Create New...