Deployed VS Scripts _never_ executes - HELP!
- From: it-support <itsupport@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 12 Jul 2007 06:46:05 -0700
Hi,
I have a bunch of .VBS files that I have deployed through Active Directory
to run when a user log on a system. I have deployed applications and they
work great. But the VBS? Never even runs, I dont even get as much as an error
when I log on and they are supposed to kick in.
Is it something Ive forgotten. Ive followed the routine to do this very
carefully and tested my scripts, and they all work when executed locally on a
machine when you I have logged in.
The Scripts I want to run on user login:
firewall - disable.vbs
Set objFirewall = CreateObject("HNetCfg.FwMgr")
Set objPolicy = objFirewall.LocalPolicy.CurrentProfile
objPolicy.FirewallEnabled = FALSE
Security Center - disable firewall notify.vbs
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set objRegistry = GetObject("winmgmts:\\" & strComputer &
"\root\default:StdRegProv")
strKeyPath = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Security Center"
strValueName = "FirewallDisableNotify"
dwValue = 1
objRegistry.SetBinaryValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName,
dwValue
service - start messenger.vbs
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colServiceList = objWMIService.ExecQuery _
("Select * from Win32_Service where Name='Messenger'")
For Each objService in colServiceList
errReturn = objService.StartService()
Next
Wscript.Sleep 20000
Set colServiceList = objWMIService.ExecQuery("Associators of " _
& "{Win32_Service.Name='Messenger'} Where " _
& "AssocClass=Win32_DependentService " & "Role=Dependent" )
For Each objService in colServiceList
objService.StartService()
Next
As I wrote, these scripts are working when executed in a running XP session.
Deployed through the Windows Server 2003 brilliant extra ordinary magic
Active Directory it does not.
I deploy it on the server by going into GE, in User Configuration ->
Windows Settings -> Scripts (Logon/Logoff) -> Logon.
And I add the script "firewall - disable.vbs" from:
C:\WINDOWS\System32\GroupPolicy\User\Scripts\Logon
I will be giving out weekend weekend astral journeys to Siberia for anyone
who can crack this nut for me.
.
- Follow-Ups:
- Re: Deployed VS Scripts _never_ executes - HELP!
- From: Paul Bergson [MVP-DS]
- Re: Deployed VS Scripts _never_ executes - HELP!
- Prev by Date: Re: adprep failure, adding 2003 R2 x64 server to 2000 domain Optio
- Next by Date: Re: cannot disable Firewall with Groip Policy Editor or login sc
- Previous by thread: Re: Backup
- Next by thread: Re: Deployed VS Scripts _never_ executes - HELP!
- Index(es):
Relevant Pages
|