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
Alejandro85

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
UsernameIssues

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
Alejandro85

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
UsernameIssues

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
Thread Forum
How to run a .bat (script) file
Hi All, I have two .bat files (script) that I'd like to run from their location in command mode with admin. privl. How do I do this? Best, ms
General Discussion
Copy shares and permissions on file x to file z? Is this possible?
I have a user for whom shares and permissions on the server are working just fine. I have another user for whom something is screwed up somewhere. I've taken a directory that is shared and I've looked up the share and permissions for both. Identical. But do this for 3,000 files/directories in...
Network & Sharing
powershell script to create user folders and set permissions
Wondering if anyone in this forum can help me figure out what I am doing wrong with my script. I am grabbing a text file with a list of users in it. I want to then create folders for all those people and then set explicit permissions on those folders to only allow the users and admin access to it....
Software
Using file permissions with an online file manager
I am using Ajaxplorer which is great but I am having some issues with file permissions. Let's say I create a file which is read only in Ajaxplorer it says it's changed file permissions but when I right click on the file to check it it's the same permissions as it was so didn't actually change. ...
General Discussion
Creating a WinPE Script File
Hello All, I'm using the WIAK CD to create a winpe boot media and it works fine, there are a few commands that you have to remember so I created a winpe.cmd file to make life easier. Here is the content of my winpe.cmd file: copype x86 c:\winpe copy c:\winpe\winpe.wim...
Installation & Setup

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 11:27.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App