Jump to content
Sign in to follow this  
Markir

RUN (regedit)

Recommended Posts

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

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

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...