Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Registry Edit Script

Posted on 2008-10-02
10
Medium Priority
?
585 Views
Last Modified: 2012-05-05
I need to push out a registry key change to my Windows XP SP3 machines.  HKEY_LOCALMACHINE\SOFTWARE\Microsoft\MSLicensing\HardwareID is the location.  What I need to do is change the permissions on the HardwareID folder for the "user" account to full pemissions.  I am wondering if there is a script I can write for this.

0
Comment
Question by:ianbasis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +2
10 Comments
 
LVL 22

Expert Comment

by:Paka
ID: 22625362
Looks like you can shell an instance to regini.exe to do it:
http://www.experts-exchange.com/Programming/Misc/Q_22143726.html
0
 
LVL 22

Expert Comment

by:Paka
ID: 22625440
Save the attached code to a file named regchange.vbs

Call the code from the logon script using:
cscript regchange.vbs
set oFSO = CreateObject("Scripting.FileSystemObject")
strFileName = oFSO.GetTempName
 
set oFile = oFSO.CreateTextFile(strFileName)
oFile.WriteLine "HKEY_LOCALMACHINE\SOFTWARE\Microsoft\MSLicensing\HardwareID [1 5 7 11 17]"
oFile.Close
 
set oShell = CreateObject("WScript.Shell")
oShell.Run "regini " & strFileName, 8, true
oFSO.DeleteFile strFileName

Open in new window

0
 

Author Comment

by:ianbasis
ID: 22625448
I am not fimiliar with this so it looks a bit too complicated.  Is there anything else I can do, or is there an example for me too follow?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 2

Expert Comment

by:TCC_HD
ID: 22625477
It looks like you can do it with a simple batch file.

See this http://support.microsoft.com/kb/245031

-TCC
0
 

Author Comment

by:ianbasis
ID: 22626494
It doesn't seem to work.  Maybe I am doing something wron.  I have set the Gp to run the regchange.vbs upon login.  Is that the correct way?

0
 

Author Comment

by:ianbasis
ID: 22627881
that works but now users are getting a permissions denied error when the script runs.  How can I fix that?
0
 
LVL 65

Accepted Solution

by:
RobSampson earned 2000 total points
ID: 22628849
Hi, just use Group Policy to set the registry permissions, if you're in an Active Directory environment.
http://www.lockergnome.com/windows/2005/01/11/set-registry-permissions-using-group-policy/
http://technet.microsoft.com/en-us/library/cc756952.aspx

Regards,

Rob.
0
 
LVL 14

Expert Comment

by:Dhiraj Mutha
ID: 22632793
Try this script,
 
Save it as permission.vbs

set oFSO = CreateObject("Scripting.FileSystemObject")
strFileName = oFSO.GetTempName
set oFile = oFSO.CreateTextFile(strFileName)
oFile.WriteLine "HKEY_LOCALMACHINE\SOFTWARE\Microsoft\MSLicensing\HardwareID [1 5 7 11 17]"
oFile.Close
set oShell = CreateObject("WScript.Shell")
oShell.Run "regini " & strFileName, 8, true
oFSO.DeleteFile strFileName
'WScript.Echo "Done!"
0
 

Author Closing Comment

by:ianbasis
ID: 31502418
Very easy way to do this.  Thanks!!
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 22639265
No worries. Thanks for the grade.

Regards,

Rob.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If like me you are one who spends a lot of time working and scripting with cmd.exe, sometimes it is handy to be able to quickly view a calendar for a given month and year. This script will quickly do just that!  Save the code posted below to a .bat …
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

604 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