Markir Posted February 21, 2005 Posted February 21, 2005 Hello, I want to run an external program "regedit": When I use the following code, it will be ok. Run('regedit /e c:\Marc.reg "HKEY_LOCAL_MACHINE\SOFTWARE\PrintKey\PrintKey2000\5.0.3"') But I want to run it with the macro "@Scriptdir" because the program could be installed on different places. What'S wrong with the code? Run('regedit /e @ScriptDir & "\Backup_Registry\MRS\mrs.reg" "HKEY_LOCAL_MACHINE\SOFTWARE\PP-COM\MRS"')
SlimShady Posted February 21, 2005 Posted February 21, 2005 Macro's are only readable by AutoIt. You passed the macro as a string to REGEDIT. This is how to do it. Run('regedit /e "' & @ScriptDir & '\Backup_Registry\MRS\mrs.reg" "HKEY_LOCAL_MACHINE\SOFTWARE\PP-COM\MRS"')
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