Jump to content

Recommended Posts

Posted

First of all I must say AutoIt is a lot of fun to code in...

For my question, I need clarification regarding the options parameter for RunAsSet().

The documentation states the following: 0 = do not load the user profile, 1 = (default) load the user profile, 2 = use for net credentials only

So if I RunAsSet("admin","myDomain","password", 0) and then perform registry operations on HKCU and an ordinary User is logged in, does the registry operation occur on the HKCU of the logged in User since I have not loaded another user profile with RunAsSet()? Would I be better off using RunAsSet("admin","myDomain","password", 2) instead?

I basically want to elevate a script's permissions to write to the registry but I want to be able to affect the currently logged on user's HKCU hive instead of manipulating anything in the admin account. Which option should I use or is RunAsSet() not a good solution for this?

TIA

Aut viam inveniam aut faciam

Posted

I figured it out... option 2 is what I wanted...

I guess I didn't provide enough information as to what I am doing. I am using Reg.exe (2003 version) to run queries against HKCU hive and deleting entries as needed. A normal user doesn't have rights to delete entries in many cases (some, but not all) so I wanted a sure fire method for setting data and values.

Aut viam inveniam aut faciam

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
×
×
  • Create New...