• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 890
  • Last Modified:

I would like to change the local policy "Devices: Unsigned driver installation behavior" with a vbscript

Is this possible  on a Windows XP operating system ?
1 Solution
I dont know vb but you can go to run, write (gpedit.msc) this will bring you
to all the polices on xp and change it from there
The recommended way to do this is in a domain using group policy, but many times that is not an option for smaller networks or Netware based networks.

Here are my thoughts on how I would accomplish this.

Create a custom security template that has the settings desired (this will allow for future local policy changes.)


Write a  batch file or VBscript to copy the template to each workstation then run secedit /configure to apply your custom security template.


Someone else may be able to contribute a script that would accomplish this....
You can save those settings to a security template (saved as an .inf file).  You can then go to each machine and import that .inf into the local security policy editor.

Here is how to export your security policies:



Almost every setting in policy's are simply easy ways to tweak registrys.  If you could find out what keys get modified by that particular policy, then you could batch or script a way to change those settings, log out, back in, change what you want, and then reboot so that the policy would take hold again.

For example to disable the run line (from http://silverstr.ufies.org/blog/archives/000257.html)

Remove Run from the Start Menu

Value Name: NoRun
Data Type: REG_DWORD (DWORD Value)
Value Data: (0 = disabled, 1 = enabled)

The policy's make things easy, but things can be controlled this way as well.

Using VB Script to Change Registry Settings :-

Dim WSHShell, n, MyBox, p, itemtype, Title, vbdefaultbutton

Set WSHShell = WScript.CreateObject("WScript.Shell")
p = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState\"
p = p & "Use Search Asst"
itemtype = "REG_SZ"
n = "no"

WSHShell.RegWrite p, n, itemtype
Title = "The Search Assistant is now disabled." & vbCR
Title = Title & "You may need to Log off/Log on" & vbCR
Title = Title & "For the change to take effect."
MyBox = MsgBox(Title,64,"Finished")

Finally Find out the registry changes that has been made by the policy using Registry Monitor

Write a VB Script for the same with the help of the above example.

It's Done.


Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now