how to enable script to run exe off of local computer

J

John

Hello,

We want each workstation to run it's anti-virus scan during the
shutdown of the computer. We use AVG anti-virus. I have setup the GPO to run
a script called AVGLogoff.vbs. However when it runs we get the error access
denied. I believe it is because the script's path isn't relative to the
local workstation. Below is the script, any help would be greatly
appreciated.

John

~AVGLogogg.vbs~


Const ABOVE_NORMAL = 32768
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objStartup = objWMIService.Get("Win32_ProcessStartup")
Set objConfig = objStartup.SpawnInstance_
objConfig.PriorityClass = ABOVE_NORMAL
Set objProcess = GetObject("winmgmts:root\cimv2:Win32_Process")
objProcess.Create "c:\progra~1\grisoft\avg6\avgscan.exe /comp c:\*.*
/clean", Null, objConfig, intProcessID
 
D

Dan Hurley

You might need to grant the user or domain group to the
local administrators group due to it might needing to
write some log entries, etc. during the app launch.

I tested this today in my lab using the fixblast.exe file
and it needed admin rights on the local system. Once I
did that, it ran like a charm...

Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top