The Realm of the Verbal Processor

Jarvis's Ramblings

ConfigMgr Failing to Run Vbscript

I’ve had a vbscript that I wrote for setting a registry key that has been causing me problems today. It’s a pretty simple script…just writing a DWORD value to HKLM to disable the backup notification in the Windows 7 Action Center. The script works fine in my testing…both running as an admin and running as Local System. I had already deployed the script to numerous computers in a pilot group, and the advertisement status was reporting that the script was completing successfully. Then I got a call saying that the notification was still showing up. I checked the machine, and the registry entry was not there…even though the script ran successfully.

After beating on it for a while I discovered the problem…the 64 bit redirection is getting in the way. In a nutshell, if a 32bit program attempts to write to certain sections of the registry, the registry call is redirected to HKLM\Software\Wow6432Node instead. This is essentially the “32 bit section” of the registry. In this instance, the script is being run by the ConfigMgr client…which is a 32bit program. The script was completing successfully…writing to the Wow6432Node instead of where I needed it to write. I did a ton of research to try to find a way around it from within the script, but was unable to figure out how to do it from within the script. However…there is a way to accomplish what I am wanting to do in ConfigMgr…

  1. Set up a Custom Task Sequence and use a “Run Command Line” step.
  2. Point that step to use the ConfigMgr package containing your script.
  3. The command line should be “cscript.exe scriptname.vbs” (without the quotes of course)
  4. Ensure that the checkbox for “Disable 64-bit file system redirection” is checked.
  5. Advertise that Task Sequence to the computers that you need it to run on.

After doing that, it worked like a charm.

Advertisements

December 15, 2010 - Posted by | ConfigMgr, scripting

1 Comment »

  1. Nice

    Comment by Nicolas Moseley | December 15, 2010


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s