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

Posted on 2006-04-07
Last Modified: 2012-05-05
Is this possible  on a Windows XP operating system ?
Question by:itbabe
    LVL 6

    Expert Comment

    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
    LVL 3

    Accepted Solution

    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....
    LVL 7

    Expert Comment

    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

    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

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Just about everyone has an old PC laying around.  Ask anyone in the IT industry, whether they are a professional or play in it as a hobby.  From outdated Desktops to cheap "throwaway" laptops, they are all around and not as hard to "fix up" as you m…
    As the title indicates, I have done this before. It chills me everytime I update the OS on my phone, ( because one time I did this and I essentially had a bricked …
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now