Jump to content

Regperm.exe revisited


Recommended Posts

Group,

Working on a script where I need to set certain permissions within the registry to limit the changes the logged on users can make (creating a 'kiosk' type environment). There have been several post concerning two different programs, SetACL and Regperm (http://homepages.cae.wisc.edu/~micro/regperm/). I have a batch file that runs Regperm without issue, and since the only permission changes I need to make are to the registry and the Regperm application is roughly 1/4 the size of SetACL I would like use Regperm. That being said, I cannot seem to get Regperm to work with a direct Run or Runwait command from Autoit. I've tried multiple combinations of double quotes, @Comspec, etc. and nothing seems to work. Yes, I can compile the application and the batch file and then have Autoit simply call the batch file, but now its gotten a little personal, I just want to see how a direct call would work. Below is the command line from my working batch file (and the only line in the file):

regperm.exe /K "HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS NT\CURRENTVERSION\WINLOGONTEST" /A:"Users":F /E

I created the registry key HKLM\Software\Microsoft\Windows NT\Currentversion\Winlogontest to use for testing, the real key, once working will be HKLM\Software\Microsoft\Windows NT\Currentversion\Winlogon.

If anyone can help out with this I would appreciate it, I'm all out of ideas. :)

Thanks in advance,

ZK

Link to comment
Share on other sites

Below is the command line from my working batch file (and the only line in the file):

regperm.exe /K "HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS NT\CURRENTVERSION\WINLOGONTEST" /A:"Users":F /E
This should work for you:

runWait('regperm.exe /K "HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS NT\CURRENTVERSION\WINLOGONTEST" /A:"Users":F /E', '', @SW_HIDE)
Link to comment
Share on other sites

LxP,

DOH!!! :) Yes, that worked. It seems I overlooked the obvious and was trying to make the task to difficult for my own good. Thanks my friend, for bringing a fresh set of eyes and additional brain cells to the problem....

ZK

Link to comment
Share on other sites

LxP, You saved me as well! I was having issues running an Msiexec command to uninstall and then install some stuff, and this was the answer! :D :D :mad:

Note to anyone who uses vars in their run command and has this issue, you may want to do the following, it worked wonders for me! :evil:

$MsiExec = StringUpper(@WindowsDir) & "\SYSTEM32\MSIEXEC /I "
$SMSPoint = "\\server\share\folder"

Run($MsiExec & '"' & $SMSPoint & "\msi installer with spaces in the name.msi" & '"')

Enjoy, and thanks! :)

edit: heh, mistyped my example, lol

Edited by Jmtyra
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...