MrChris Posted March 28, 2006 Share Posted March 28, 2006 I have a command that I am trying to run that works only when its run from the Start/RUN dialog via XP/2003 If I run it from a command prompt the program launches but gives an error. If I run it from the RUN Dialog it runs with no problem. I dont need there to be any GUI or buttons. If I launch the AU3 script it should just simulate the below data. How can I do this? I tried the below but its giving the same results as if its running from a command prompt. Run("program.exe /s /d /fs /se g") What code could I use to simulate it running from the Start/RUN Dialog box? Many thanks, MrChris Link to comment Share on other sites More sharing options...
CyberSlug Posted March 28, 2006 Share Posted March 28, 2006 What is the program and the error you get? I can think of some programs that launch from Start/Run but not the command prompt (msconfig, winword) because of a registry setting that causes the run dialog to try to find the program.... ; Worst-case woarkaround Send("#r") WinWait("Run") ControlSetText("Run","","Edit1","program.exe /s /d /fs /se g") ControlClick("Run","","OK") Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
MrChris Posted March 28, 2006 Author Share Posted March 28, 2006 Thanks for the fast reply,Well heres the deal.I use TrueCrypt v4.1 Here for data encryption. In adition I created a a file container in a ADS (NTFS Alternate Data Stream) inside the root of the drive. When I run the command TrueCrypt.exe /q /a /e /m rm /v :tcvolume If I run that command from a Command/DOS Prompt TrueCrypt opens but gives me an error that the file cannot be found. If I run it from the Start/Run Dialog it works just fine. So my objective is to plug this AU3/EXE into the AUTORUN.INF of the drive to process the command without any DOS windows ect.. opening. Make Sense?Hope this helps,Thanks againMrChris Link to comment Share on other sites More sharing options...
MrChris Posted March 28, 2006 Author Share Posted March 28, 2006 (edited) Ohh yeah TrueCrypt is on a USB drive that has a drive letter that will be changing. For some reason TC does not like the : in the command I think Edited March 28, 2006 by MrChris Link to comment Share on other sites More sharing options...
evilertoaster Posted March 28, 2006 Share Posted March 28, 2006 use the msdos command "start" before the command. like "start TrueCrypt.exe /q /a /e /m rm /v :tcvolume" from the command prompt (without the quotes) Link to comment Share on other sites More sharing options...
MrChris Posted March 28, 2006 Author Share Posted March 28, 2006 When I use the above string in AUTORUN.INF I get an Open With dialog window when I double click on the drive. Any other Ideas? Thanks MrChris Link to comment Share on other sites More sharing options...
evilertoaster Posted March 29, 2006 Share Posted March 29, 2006 (edited) When I use the above string in AUTORUN.INF I get an Open With dialog window when I double click on the drive.Any other Ideas?ThanksMrChrisTry making a batch file (on the drive) that has that command in it and set the autorun to that.(edit: http://www.truecrypt.org seems to be down atm for me...so i can't try this myself...) Edited March 29, 2006 by evilertoaster Link to comment Share on other sites More sharing options...
cal Posted March 29, 2006 Share Posted March 29, 2006 Sounds like the same problem I had with ACDSee. Use the run command from autoit or from a command line or a batch file and the program complains about missing files yet the Start/RUN Dialog box works. My soln was to run a shortcut. if ProcessExists("ACDSee5.exe") == 0 Then Run(@ComSpec & " /c " & "aaa.lnk", "C:\Program Files\ACD Systems\ACDSee\5.0\",@SW_HIDE) Else WinSetState('ACDSee 5.0','',@SW_RESTORE) EndIf While I can't run the exe directly I can run the lnk file. aaa.lnk is just a shortcut to the exe file. For some reason spaces in the file name of the shortcut do not work. This shortcut is named aaa but needs to be referenced by aaa.lnk in the run command. 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