Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Script permissions in .reg file?


17 Apr 2013   #1

Windows 7 Ultimate x64
 
 
Script permissions in .reg file?

I'm having a little problem with a few .reg files that hold some configurations I like to have. After applying them countless times by hand, I created a couple of files to just apply the same changes by double-clicking only. So far, so good.

Problem is, some of those reg scripts touch keys that are owned by the pesky "TrustedInstaller" (which I don't trust), so if a file tries to modify/delete one of those, it would just give an error, even with regedit running as administrator.
When doing changes by hand, I just take ownership, give administrator group full control and make the changes, but I'm seeking for a way to do the same on the same .reg file.

Thanks!

My System SpecsSystem Spec
.

18 Apr 2013   #2

W7 Pro SP1 64bit
 
 

Quote   Quote: Originally Posted by Alejandro85 View Post
....When doing changes by hand, I just take ownership, give administrator group full control....
So now that part of your registry is less secure... unless you put the security settings back as they should be.

PowerShell can change the registry permissions, but you really should test inside a frozen virtual machine that you cannot harm.
My System SpecsSystem Spec
18 Apr 2013   #3

Windows 7 Ultimate x64
 
 

There is no difference in security if I give modify permissions to admin group only, as the same admin group can modify the permissions to get those anyway. Of course, if I want to delete a key, permissions no longer matter. But that's not my concern. I also have tested everything I'm scripting, in some cases keeping the reversion scripts too. Rest assured, I know what I'm doing

My problem is TrustedInstaller. By having keys owned and locked by it, administrators are effectively deprived the permission to administer the system, so importing .reg files no longer work sometimes, depending on what I touch.

You name PowerShell. Do you have any samples or references on how to do so and manage to import the keys? I know nearly nothing about it, but seems that it may be able to do what I want. Thanks!
My System SpecsSystem Spec
.


18 Apr 2013   #4

W7 Pro SP1 64bit
 
 

Quote   Quote: Originally Posted by Alejandro85 View Post
There is no difference in security if I give modify permissions to admin group only, as the same admin group can modify the permissions to get those anyway....
That is one way to look at it. Another way is to think of your anti-virus tool's heuristic rules. Any program/script/tool that programmatically changes such permissions should be halted until the user gives permission to go forward. But now a malicious program only needs to query the permissions to know that it can do stuff to those keys.

I figure that there is a reason for the permissions being they way that they are. I too change them, but mostly I deny the ability to change stuff I don't want changed.

I don't know/use PowerShell. Others in the forum are quite good at it. Maybe someone will stop by and help you out.
My System SpecsSystem Spec
Reply

 Script permissions in .reg file?




Thread Tools



Similar help and support threads for2: Script permissions in .reg file?
Thread Forum
How to run a .bat (script) file General Discussion
Copy shares and permissions on file x to file z? Is this possible? Network & Sharing
powershell script to create user folders and set permissions Software
Using file permissions with an online file manager General Discussion
Creating a WinPE Script File Installation & Setup
Create ErrorHandler.cmd script file General Discussion

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 08:17 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33