Posts

Showing posts with the label Permission

Permissions to registry using setacl

Recently I was trying giving permission to one of the registry hives with Subinacl, but it was not working despite all efforts and checking all the syntax and a lot of troubeshooting. Then I came across another permission granting utility known as SetACL. It worked like a charm. So you can try using this utility is Subinacl fails. You can download SetACL from  http://helgeklein.com/download/ Here is an example to run SetACL to give registry permissions. "SetACL.exe" -on "hkcr\Interface" -ot reg -actn setowner -ownr "n:Administrators" "SetACL.exe" -on "hkcr\Interface" -ot reg -actn ace -ace "n:Users;p:full" Object name (-on) : This is the path to the object SetACL should operate on (file/directory/registry key/network share/service/printer). Object type (-ot) : What kind of object does the object name refer to: file or directory (file), registry key (reg), service (srv), printer (prn), network share (shr)? Action (-actn) : What...

Subinacl to give permissions to registry/Files

Subinacl is a useful utility to give permissions to registries. Here is a simple example how to give permissions to registry. subinacl.exe /subkeyreg HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Optika /grant=administrators=f /grant=system=f /grant=users=f /setowner=administrators >> %temp%\subinacl_output.txt /keyreg HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Optika /grant=administrators=f /grant=system=f /grant=users=f /setowner=administrators >> %temp%\subinacl_output.txt Subinacl can be downloaded from net. More detailed Usage as per your requirements. This contains lots of features. You can write your comments on what you used and if it worked. Help others by posting your real time examples. Usage :      SubInAcl [/option...] /object_type object_name [[/action[=parameter]...] /options    :     /outputlog=FileName                 /errorlog=FileName ...

My First Powershell script

Seems that Powershell is the way to go forward as it is well supported with Windows 7 and Microsoft. It is a powerful script. I think it will revolutionize the way we script today. I just wrote my first powershell script and thought it would be good to share with all. I am not going to give any tutorial for Powershell as there are a lot of them available. There are a few things which are worth noting in this script: 1) You can get the script directory from the below script in Get-ScriptDirectory function. 2) You can suppress the remote exe installation prompt by command: $env:SEE_MASK_NOZONECHECKS = 1 code Remove-Item env:\SEE_MASK_NOZONECHECKS 3) Installation of setup.exe with parameters can be seen in function InstallPackage 4) Permissions can be set in Powershell script using the GivePermissions function below. Here is the code: ------------------------------------------------------ function Get-ScriptDirectory { $Invocation = (Get-Variable MyInvocation -Scope 1).Value Split-Path $I...

Different Ways of Giving Permissions in Your Windows Installer

Image
Windows XP/Windows 7 works under a locked down environment in most organisations. The MSI authors generally have to provide permissions to the installation directory, so that the users without admin rights are able to access and write data into the installation directory. When you set permissions, you are specifying what level of access the user has to the folder and its files and what users can do within that folder such as save, delete, or read files. If you would like to know how to set permissions through Powershell Script, then I would recommend you to read my new blog entry here: http://msiworld.blogspot.com/2012/01/my-first-powershell-script.html There are six standard permission types which apply to files and folders in Windows XP/Windows 7: Full Control Modify Read & Execute List Folder Contents Read Write Each level represents a different set of actions users can perform. See the table below for more information. For folders you can also set your own unique permission...