Solved

Help with Registry and Batch

Posted on 2007-03-22
14
309 Views
Last Modified: 2010-04-16
Hi all,
I am editing a batch file I use to setup new computers on my network.  I have 2 batch files I run.  The first is used to launch the setup programs. The second batch file will be used to add permissions to the newly installed programs.  I've setup the file to use the CALCS program, which is working fine.  
My next step here is to change permissions on registry keys, for the newly installed programs.
I am trying to add the local group 'USERS' to regkeys with full control, on those specific keys only.  I've checked reg.exe, but cannot find what I am looking for.
Can the CALCS program be used to also change registry key perms?

Thanks,
0
Comment
Question by:jsctechy
  • 7
  • 7
14 Comments
 
LVL 67

Accepted Solution

by:
sirbounty earned 500 total points
ID: 18770847
0
 
LVL 1

Author Comment

by:jsctechy
ID: 18770886
Yes,
But now this file has to be installed on the PC that is running the batch.  There is no way to do it in Win XP w/o an additional too?
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18770914
None that I know of...if you're adding to HKCU though the user should have access to that hive...
0
 
LVL 1

Author Comment

by:jsctechy
ID: 18771040
I am adding a key to 'HKEY_LOCAL_MACHINE\SOFTWARE\REUTERS"
I am logging on to the machine w/ the PC administrator ID, setuping up the PC for new users.  Once we have them logged on, they run into an issue where they are unable to specify the servers to connect to, for REUTERS.
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18771074
http://www.windowsitpro.com/Article/ArticleID/20503/20503.html mentions the usage of the adssecurity.dll library - though I've not used that method - but again, it's not a native solution.
Can you point to a public share to access the subinacl usage?
0
 
LVL 1

Author Comment

by:jsctechy
ID: 18771141
Is it possible to export only a certain part of the registry, and then import that part into the new PC?
So I can change the perms for the group on 1 computer, then import it to any PC I need to?
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18771173
"maybe"...reason being is that the acl will be pointing to 'your' local security.
Those users may not be on the other system(s), so you'll likely get a lot of 'invalid' entries, like S-0133...bunch of numbers... indicating that the account wasn't found.

However, the SID for Users should be the same across all systems - so while it may be ugly with the invalid accounts, this just might work for you... :)
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 1

Author Comment

by:jsctechy
ID: 18771390
Sir,
I think I've made some progress.  I took your advice by adding the SUBINACL file to a shared drive.  I can just copy that in the first batch file to the %systemroot%\system32 folder, then run it.  I've got this so far
subinacl /KEYREG HKEY_LOCAL_MACHINE\SOFTWARE\REUTERS /GRANT=USERS=F
However, it will not apply to the subkeys (sub hives) in the registry.  Any idea what I am missing?
0
 
LVL 1

Author Comment

by:jsctechy
ID: 18771522
Sir,
I think I got it.  I need to use 'SUBKEYREG' for all the sub hives/directories.
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18771668
Sorry about that - got pulled away, but looks like you found the magic key! :^)
0
 
LVL 1

Author Comment

by:jsctechy
ID: 18771752
yeah, thanks.  I now have to figure out how to install a printer- IP printer through batch.  
If you know a way, let me know- or I'll just make a new post.
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18771777
Hmm - sorry...not my strong suit anymore (4 years ago maybe :).
I avoid printers until I have to print out my expense reports or income tax copies... : )
0
 
LVL 1

Author Comment

by:jsctechy
ID: 18771811
haha- Okay, I appreciate the help.

Thanks
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18771838
Happy to assist - thanx for the grade! :^)
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

867 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

18 Experts available now in Live!

Get 1:1 Help Now