Jump to content

Problem with Run()


Recommended Posts

I am very new to AutoIT so please forgive me.

I am trying to write a program to start Renamer.exe which is located at C:\Program Files\Wizards of the Coast\Magic Online III\Renamer.exe. The code:

Run("C:\Program Files\Wizards of the Coast\Magic Online III\Renamer.exe", "C:\Program Files\Wizards of the Coast\Magic Online III\")

does nothing.

I have tried using the RunAs() function but this creates two problems. First, I would like the program to be exportable to other computers without have the new user to enter their profile password. Second, Renamer.exe launches other files and RunAs() leaves me in the wrong working directory, causing renamer.exe to have error messages and fail to work.

P.S. I am aware that there is an old thread with essentially the same issue, the code that isn't working for me is the solution provided in that thread.

Link to comment
Share on other sites

What happens when you enter this line in the Run console in the Start menu?

"C:\Program Files\Wizards of the Coast\Magic Online III\Renamer.exe", "C:\Program Files\Wizards of the Coast\Magic Online III"

Entering:

C:\Program Files\Wizards of the Coast\Magic Online III\Renamer.exe

into the run console on the start menu launches renamer.exe.

Link to comment
Share on other sites

I think one of these should work.

Run(@ProgramFilesDir & "\Wizards of the Coast\Magic Online IIII\Renamer.exe")

Run(@ProgramFilesDir & "\Wizards of the Coast\Magic Online IIII\Renamer.exe", @ProgramFilesDir & "\Wizards of the Coast\Magic Online IIII")

Just tried both of those, neither worked. Is it possibly the vista user account controls? I just can't understand why nothing happens, not even an error message.
Link to comment
Share on other sites

It appears I spoke too soon. The problem with this work-around is Admin rights on Vista. Since renamer.exe is being not being directly launched by my script it does not inherit the admin rights from #requireadmin and a user needs to be present every time the program would be launched. Since the whole idea of my script is to not require an active user, this is a major problem. Ideally once renamer.exe is launched it will run as long as the script, however it accesses a rather glitch-prone program that likes to randomly close and often requires restarting. If I can't get renamer.exe to inherit the admin rights from my script then anytime that program launches the script won't be able to restart it.

Link to comment
Share on other sites

Search the forums for your issue. I've seen it before.

EDIT:

What does renamer actually do? Why not create that in AutoIt...

Edited by BrettF
Link to comment
Share on other sites

Renamer.exe is third-party software that is used to update the main software. I have tried opening the main file that renamer.exe opens but have the same problems I get when trying to use renamer.exe.

As for searching the forums, I am aware that there is basically the exact same problem in another thread, however the solution in that thread has not worked for me.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...