Welcome, Register for free! or Login below:
EduGeek.net RSS Feeds Register FAQ Members Social Groups User Map Calendar Search Today's Posts Mark Forums Read

Windows

Windows forum sponsored by

For all of your Windows problems

Go Back   EduGeek.net Forums > Technical > Windows
Reply
 
LinkBack Thread Tools Search Thread
Sponsored Links
Old 12-09-2008, 07:53 PM   #1
 
Wheelgunr's Avatar
 
Join Date: Sep 2008
Location: Massachusetts
Posts: 5
usa us massachusetts
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0 Wheelgunr is an unknown quantity at this point
Default Changing permissions on a registry key

Hi. I need to find out how to change permissions on a registry key for a specific software package. It requires the following to have FULL Control:

HKLM\SOFTWARE
Administrators (%localmachine%\administrators)
SYSTEM
Users (%localmachine%\Users)

If Reg.exe can be used, that would be great. If it needs to be a VB file, I'd need the entire script.

Thanks!
  Reply With Quote
Old 12-09-2008, 08:17 PM   #2
 
maniac's Avatar
 
Join Date: Feb 2007
Location: Kent
Posts: 2,112
uk uk kent
Thanks: 126
Thanked 235 Times in 173 Posts
Rep Power: 70 maniac has a brilliant future maniac has a brilliant future maniac has a brilliant future maniac has a brilliant future maniac has a brilliant future maniac has a brilliant future maniac has a brilliant future maniac has a brilliant future maniac has a brilliant future maniac has a brilliant future maniac has a brilliant future
Default

You should be able to achieve this using regini.exe

How to Use Regini.exe to Set Permissions on Registry Keys
How to change registry values or permissions from a command line or a script

I think you can call this from machine startup script by sticking the exe on the netlogon share, or using the -m option you can do the changes remotely. I've never tried it, but the MS knowledgebase articles should help you use it.

Incidently those articles refer to windows 2000 and NT4, I've no idea if the same tool is included or will work with XP/server 2003 but it's the best I can find for what you want to do.

Mike.

Last edited by maniac; 12-09-2008 at 08:21 PM..
  Reply With Quote
Old 12-09-2008, 11:14 PM   #3
 
meastaugh1's Avatar
 
Join Date: Jul 2006
Location: London/Hertfordshire
Posts: 771
uk
Thanks: 50
Thanked 59 Times in 47 Posts
Rep Power: 18 meastaugh1 is a jewel in the rough meastaugh1 is a jewel in the rough meastaugh1 is a jewel in the rough
Default

Is group policy not an option?
  Reply With Quote
Old 15-09-2008, 07:33 PM   #4
 
box_l's Avatar
 
Join Date: May 2007
Location: Herefordshire
Posts: 196
uk
Thanks: 21
Thanked 30 Times in 26 Posts
Rep Power: 11 box_l has a spectacular aura about box_l has a spectacular aura about
Default

i have used this for an old RM app that needed user access to its own keys

save this as .vbs and call from your login script

Code:
'  VBScript.

'  

set WshShell = CreateObject("WScript.Shell")

' IN THE NEXT LINE (starting WshShell.Run..)


WshShell.Run "runas /user:administrator@domain.sch.uk ""\\server\netlogon\reg\setacl_r_snapshot.bat"""

WScript.Sleep 1000

' IN THE NEXT LINE (starting WshShell.SendKeys..)

'a) Enter an administrator password and leave the "~"

WshShell.Sendkeys "passwordhere~"

WScript.Quit()

save this as .bat

Code:
'edu-tech solutions Nov 2007

' install registry key

regedit /s \\2100-fs01\NETLOGON\reg\rm.reg

' set permissions on key
call "\\server\NETLOGON\reg\SetACL.exe" -on "HKEY_LOCAL_MACHINE\SOFTWARE\InterActual Technologies" -ot reg -actn ace -ace "n:domain.sch.uk\Domain Users;p:full"
call "\\server\NETLOGON\reg\SetACL.exe" -on "HKEY_LOCAL_MACHINE\SOFTWARE\Research Machines" -ot reg -actn ace -ace "n:domain.sch.uk\Domain Users;p:full"
and make sure that setacl.exe is in the same folder.

replace domain, server iand password in the scripts with the appropriate info

a bit messy i know, but it works.

hope this helps.

BoX
  Reply With Quote
Old 15-09-2008, 09:00 PM   #5
 
srochford's Avatar
 
Join Date: Aug 2005
Location: London
Posts: 2,259
uk
Thanks: 46
Thanked 315 Times in 278 Posts
Blog Entries: 1
Rep Power: 72 srochford has a brilliant future srochford has a brilliant future srochford has a brilliant future srochford has a brilliant future srochford has a brilliant future srochford has a brilliant future srochford has a brilliant future srochford has a brilliant future srochford has a brilliant future srochford has a brilliant future srochford has a brilliant future
Default

By far the easiest way to do this is with group policy.

If you can't use group policy then run the batch file used by @Box but as a machine startup script rather than a login script . That way you don't need to use the admin password (which I really wouldn't recommend; the login script, complete with password, can be read by any of your users)
  Reply With Quote
Old 16-09-2008, 11:42 PM   #6
 
box_l's Avatar
 
Join Date: May 2007
Location: Herefordshire
Posts: 196
uk
Thanks: 21
Thanked 30 Times in 26 Posts
Rep Power: 11 box_l has a spectacular aura about box_l has a spectacular aura about
Default

agreed, in its current form.

i do use microsofts script encoder to obfuscate it enough that most people will not even attempt to read/decode it.

it also gets removed from its location when not in use.

BoX
  Reply With Quote
Old 18-09-2008, 02:14 PM   #7
 
Wheelgunr's Avatar
 
Join Date: Sep 2008
Location: Massachusetts
Posts: 5
usa us massachusetts
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0 Wheelgunr is an unknown quantity at this point
Default Thanks

Thanks to everyone for their replies. My AD guy set up a GPO to set the permissions needed.
  Reply With Quote
Reply

EduGeek.net Forums > Technical > Windows

Similar Threads
Thread Thread Starter Forum Replies Last Post
logoff script to delete registry key ICMC Scripts 3 26-01-2009 11:37 PM
[MS Office - 2007] Error 1406: Setup cannot write the value to the registry key Gatt Office Software 1 13-09-2008 03:19 PM
Getting a batch file to react to a registry key Wheelgunr Windows 5 12-09-2008 05:23 PM
Deleted a registry key - help! mrcrazy04 Windows 1 19-07-2007 07:26 AM
Script To Change A Registry Key DaveP Windows 6 07-03-2007 01:57 PM



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search Thread
Search Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 04:57 PM.
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.
Copyright EduGeek.net




website uptime

© 2005 - 2009 EduGeek.net
SERVER: 4
no new posts