Jump to content
Sign in to follow this  
jaturley

@ScriptDir problem

Recommended Posts

jaturley

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

Share this post


Link to post
Share on other sites
Werty

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 by Werty

Share this post


Link to post
Share on other sites
AlmarM

Try this.

RunAs("username", "domain", "password", 0, "REGEDIT /S " & @ScriptDir & "\prefs.reg")
Edited 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.

Share this post


Link to post
Share on other sites
jaturley

Try this: RunAs("username", "domain", "password", 0, "regedit.exe /S " & @ScriptDir & "\prefs.reg")

This worked great. Thanks

Share this post


Link to post
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
Sign in to follow this  

×