Acces permissions on Registry
Hello,
Does anyone know how to set permissions on one of the "Root" Registry key’s?
So I mean HKEY_CLASSES_ROOT, for instance.
It has to be done either from within the MSI itself, ore by script.
I know of a solution by script, but the problem is I have to use a MSI-Property as group name, and I don't know how to get a property from a MSI file, into a VBS-Script ..
So if anyone can help me with setting the permissions directly, or getting a property value from an MSI into a VBS-Script, I would be ferry happy.
Thanks in advance. [;)]
Does anyone know how to set permissions on one of the "Root" Registry key’s?
So I mean HKEY_CLASSES_ROOT, for instance.
It has to be done either from within the MSI itself, ore by script.
I know of a solution by script, but the problem is I have to use a MSI-Property as group name, and I don't know how to get a property from a MSI file, into a VBS-Script ..
So if anyone can help me with setting the permissions directly, or getting a property value from an MSI into a VBS-Script, I would be ferry happy.
Thanks in advance. [;)]
0 Comments
[ - ] Hide Comments

so that the conversation will remain readable.
Answer this question
or Comment on this question for clarity
Answers
In your msi call a vbs action en copy the vbs in to it
with de MMC create a sec.inf file en set the extra key's you want the user te modify and put this inf file in youre msi
at the end sec edit wil purce these rights good luck!!!
Dim objShell, objFso '// Declaring object variables
Set objShell = CreateObject("WScript.Shell") '// Creates Shell object
Set objFso = CreateObject("Scripting.FileSystemObject") '// Creates File System object
Set strSystemPath = objFso.GetSpecialFolder(1)
objShell.Run strSystemPath & "\secedit.exe /configure /db secedit.sdb /cfg " & _
"""%WINDIR%\security\templates\APPLICATIONNAME.inf"" /log " & _
"""%WINDIR%\security\logs\Appicationname.inf.log"" /quiet", 0, true
with de MMC create a sec.inf file en set the extra key's you want the user te modify and put this inf file in youre msi
at the end sec edit wil purce these rights good luck!!!
Dim objShell, objFso '// Declaring object variables
Set objShell = CreateObject("WScript.Shell") '// Creates Shell object
Set objFso = CreateObject("Scripting.FileSystemObject") '// Creates File System object
Set strSystemPath = objFso.GetSpecialFolder(1)
objShell.Run strSystemPath & "\secedit.exe /configure /db secedit.sdb /cfg " & _
"""%WINDIR%\security\templates\APPLICATIONNAME.inf"" /log " & _
"""%WINDIR%\security\logs\Appicationname.inf.log"" /quiet", 0, true
Please log in to comment
I have looked around here a bit for working with file permissions and found that this looks the best option.
I am not much of a VB person so I would like to know if this script is OK. You know the old fat finger syndrome. What is with the underscores after the &
I tried this in a msi and it did not seem to want to work.
THanks for the help
I am not much of a VB person so I would like to know if this script is OK. You know the old fat finger syndrome. What is with the underscores after the &
I tried this in a msi and it did not seem to want to work.
THanks for the help
ORIGINAL: Mooijr
In your msi call a vbs action en copy the vbs in to it
with de MMC create a sec.inf file en set the extra key's you want the user te modify and put this inf file in youre msi
at the end sec edit wil purce these rights good luck!!!
Dim objShell, objFso '// Declaring object variables
Set objShell = CreateObject("WScript.Shell") '// Creates Shell object
Set objFso = CreateObject("Scripting.FileSystemObject") '// Creates File System object
Set strSystemPath = objFso.GetSpecialFolder(1)
objShell.Run strSystemPath & "\secedit.exe /configure /db secedit.sdb /cfg " & _
"""%WINDIR%\security\templates\APPLICATIONNAME.inf"" /log " & _
"""%WINDIR%\security\logs\Appicationname.inf.log"" /quiet", 0, true
Please log in to comment
Have you made an inf file with security templates?
You must add the inf file into the package under c:\windows\security\templates.
You also have to modify the APPLICATIONNAME.inf name in the script with the name of your inf filename.
After that it will lauch secedit.exe to apply the inf file to set permissions.
ps: the underscores is just an end of line sign
You must add the inf file into the package under c:\windows\security\templates.
You also have to modify the APPLICATIONNAME.inf name in the script with the name of your inf filename.
After that it will lauch secedit.exe to apply the inf file to set permissions.
ps: the underscores is just an end of line sign
Please log in to comment
Comments