Markir 0 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"') Share this post Link to post Share on other sites
SlimShady 1 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"') Share this post Link to post Share on other sites
Markir 0 Posted February 21, 2005 Thanks for helping so fast! Share this post Link to post Share on other sites