GoofyGremlin Posted July 20, 2009 Share Posted July 20, 2009 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 More sharing options...
GoofyGremlin Posted July 20, 2009 Author Share Posted July 20, 2009 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 More sharing options...
GoofyGremlin Posted July 20, 2009 Author Share Posted July 20, 2009 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 More sharing options...
GoofyGremlin Posted July 20, 2009 Author Share Posted July 20, 2009 Tried that, compiled it, ran it as administrator and still nothing. Is there any way to just open the Run prompt from the start menu and paste the file path in there? Link to comment Share on other sites More sharing options...
GoofyGremlin Posted July 20, 2009 Author Share Posted July 20, 2009 Thanks a lot for your help. Maybe not as elegant as I would have liked but it will work. Link to comment Share on other sites More sharing options...
GoofyGremlin Posted July 20, 2009 Author Share Posted July 20, 2009 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 More sharing options...
BrettF Posted July 20, 2009 Share Posted July 20, 2009 RunAs? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
GoofyGremlin Posted July 20, 2009 Author Share Posted July 20, 2009 RunAs?I have two problems with run as. Its not portable to other computers and it messes up renamer.exe, causing it to have an error message that it cannot find the files its looking for in the working directory. Link to comment Share on other sites More sharing options...
BrettF Posted July 20, 2009 Share Posted July 20, 2009 (edited) Search the forums for your issue. I've seen it before. EDIT: What does renamer actually do? Why not create that in AutoIt... Edited July 20, 2009 by BrettF Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
GoofyGremlin Posted July 20, 2009 Author Share Posted July 20, 2009 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 More sharing options...
trung0407 Posted July 20, 2009 Share Posted July 20, 2009 You should write Run("Renamer.exe", "C:\Program Files\Wizards of the Coast\Magic Online III") or Run("C:\Program Files\Wizards of the Coast\Magic Online III\Renamer.exe" Link to comment Share on other sites More sharing options...
GoofyGremlin Posted July 21, 2009 Author Share Posted July 21, 2009 Neither of those work. Only thing working so far is opening it through the start menu's run module. Link to comment Share on other sites More sharing options...
Mobius Posted July 21, 2009 Share Posted July 21, 2009 (edited) FileChangeDir('"'& @PROGRAMFILESDIR &'\Wizards of the Coast\Magic Online III"') Run("Renamer.exe",@WORKINGDIR) ; OR Run('"'& @PROGRAMFILESDIR &'\Wizards of the Coast\Magic Online III\Renamer.exe"','"'& @PROGRAMFILESDIR &'\Wizards of the Coast\Magic Online III"') Edited July 21, 2009 by Mobius Link to comment Share on other sites More sharing options...
GoofyGremlin Posted July 22, 2009 Author Share Posted July 22, 2009 Sadly neither of those worked either. This is very frustrating, seems like it should be so simple. Thanks for all the suggestions guys. Link to comment Share on other sites More sharing options...
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