Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Update Antivirus DAT file through login script

Featured Replies

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

I'm confused - you want to replace a .bat or .cmd file with a .vbs script, is that correct?

  • Author

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"

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.

  • Author

I found the VB script that can autoupdate the antivirus through login script.

Thanks to everyone.

  • Author

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

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.