• 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 ?
0
itbabe
Asked:
itbabe
1 Solution
 
davy999Commented:
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
0
 
acsmedicCommented:
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.)

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/sce_newconfig.mspx?mfr=true

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

http://technet2.microsoft.com/WindowsServer/en/Library/b1007de8-a11a-4d88-9370-25e2445605871033.mspx

Someone else may be able to contribute a script that would accomplish this....
0
 
sunilcomputerCommented:
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:

http://www.microsoft.com/resources/documentation/Windows/XP/all/reskit/en-us/Default.asp?url=/resources/documentation/Windows/XP/all/reskit/en-us/prdd_sec_lqvj.asp

================================================================

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

UKey:[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
SKey:[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
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
http://www.sysinternals.com/Files/RegmonNt.zip

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

It's Done.







0

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