jaturley Posted October 7, 2010 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
jaberwacky Posted October 7, 2010 Posted October 7, 2010 Try this: RunAs("username", "domain", "password", 0, "regedit.exe /S " & @ScriptDir & "\prefs.reg") Helpful Posts and Websites: AutoIt Wiki | Can't find what you're looking for on the Forum? My scripts: Guiscape | Baroque AU3 Code Formatter | MouseHoverCalltips | SciTe Customization GUI | ActiveWindowTrack Toy | Monitor Configuration UDF
Werty Posted October 7, 2010 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!
AlmarM Posted October 7, 2010 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.
jaturley Posted October 7, 2010 Author Posted October 7, 2010 Try this: RunAs("username", "domain", "password", 0, "regedit.exe /S " & @ScriptDir & "\prefs.reg")This worked great. Thanks
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