jaturley Posted October 7, 2010 Share Posted October 7, 2010 I have the following line in a script: RunAs("username", "domain", "password", 0, "REGEDIT /S @ScriptDir \prefs.reg") Regedit is not importing the .reg file into the registry. If I modify the script to use an absolute path to the .reg file regedit imports the .reg file. I need to get the script to work without defining and absolute path. Thanks Link to comment Share on other sites More sharing options...
jaberwacky Posted October 7, 2010 Share Posted October 7, 2010 Try this: RunAs("username", "domain", "password", 0, "regedit.exe /S " & @ScriptDir & "\prefs.reg") Helpful Posts and Websites: AutoIt3 Variables and Function Parameters MHz | AutoIt Wiki | Using the GUIToolTip UDF BrewManNH | Can't find what you're looking for on the Forum? Link to comment Share on other sites More sharing options...
Werty Posted October 7, 2010 Share Posted October 7, 2010 (edited) Try... (untested) RunAs("username", "domain", "password", 0, "REGEDIT " & "/S" & @ScriptDir & " \prefs.reg") ...or something like that, there are missing &'s. Edit/ bleh, too slow Edited October 7, 2010 by Werty Some guy's script + some other guy's script = my script! Link to comment Share on other sites More sharing options...
AlmarM Posted October 7, 2010 Share Posted October 7, 2010 (edited) Try this. RunAs("username", "domain", "password", 0, "REGEDIT /S " & @ScriptDir & "\prefs.reg") Edited October 7, 2010 by AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
jaturley Posted October 7, 2010 Author Share Posted October 7, 2010 Try this: RunAs("username", "domain", "password", 0, "regedit.exe /S " & @ScriptDir & "\prefs.reg")This worked great. Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now