mrmacadamia Posted May 18, 2009 Share Posted May 18, 2009 i need to run command "C:\Program Files\LiteStep\utilities\wxlua.exe" "C:\Program Files\LiteStep\utilities\LOSS.lua" explorer with the code Run(@ComSpec & " /c " & 'C:\Program Files\LiteStep\utilities\wxlua.exe C:\Program Files\LiteStep\utilities\LOSS.lua explorer', "") but i can't seem get it work. Problem with the spaces between Program Files or maybe the quotation marks. I tried all, but failed. I know I can automate by run it by start>run sendtext but i want to know to execute it from command line. Thanks Link to comment Share on other sites More sharing options...
Authenticity Posted May 18, 2009 Share Posted May 18, 2009 Run(@ComSpec & ' /c "C:\Program Files\LiteStep\utilities\wxlua.exe" "C:\Program Files\LiteStep\utilities\LOSS.lua" explorer') Link to comment Share on other sites More sharing options...
mrmacadamia Posted May 18, 2009 Author Share Posted May 18, 2009 Run(@ComSpec & ' /c "C:\Program Files\LiteStep\utilities\wxlua.exe" "C:\Program Files\LiteStep\utilities\LOSS.lua" explorer') nope, it doesn't work Link to comment Share on other sites More sharing options...
Authenticity Posted May 18, 2009 Share Posted May 18, 2009 And what happen if you run the exact line in the command line? Link to comment Share on other sites More sharing options...
mrmacadamia Posted May 18, 2009 Author Share Posted May 18, 2009 And what happen if you run the exact line in the command line? i run using windows's START > RUN and I put exactly like this "C:\Program Files\LiteStep\utilities\wxlua.exe" "C:\Program Files\LiteStep\utilities\LOSS.lua" explorer and a window came out, "You have set explorer.exe as your etc etc ......" Yes No Undo Link to comment Share on other sites More sharing options...
mrmacadamia Posted May 18, 2009 Author Share Posted May 18, 2009 well, i change /c into /k to see where it stopped. As a result in the command window it says 'C:/Program' cannot be executed. I think the spaces give me the problem although I change the C:\Program Files into @ProgramFilesDir or %programfiles%. Link to comment Share on other sites More sharing options...
martin Posted May 18, 2009 Share Posted May 18, 2009 well, i change /c into /k to see where it stopped.As a result in the command windowit says 'C:/Program' cannot be executed.I think the spaces give me the problem although I change the C:\Program Files into @ProgramFilesDir or %programfiles%.Can you post exactly what you tried which doesn't work, or are you saying you get that error message when yopu try the code that Authenticity posted? Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Mobius Posted May 18, 2009 Share Posted May 18, 2009 well, i change /c into /k to see where it stopped. As a result in the command window it says 'C:/Program' cannot be executed. I think the spaces give me the problem although I change the C:\Program Files into @ProgramFilesDir or %programfiles%.Ah a fellow litestepper, try $CurrDir = @WORKINGDIR FileChangeDir(@ProgramFilesDir &"\LITESTEP\UTILITIES") RunWait("wxlua.exe loss.lua explorer",@WORKINGDIR) FileChangeDir($CurrDir) Link to comment Share on other sites More sharing options...
mrmacadamia Posted May 18, 2009 Author Share Posted May 18, 2009 (edited) Ah a fellow litestepper, try $CurrDir = @WORKINGDIR FileChangeDir(@ProgramFilesDir &"\LITESTEP\UTILITIES") RunWait("wxlua.exe loss.lua explorer",@WORKINGDIR) FileChangeDir($CurrDir) walla...! you are genius! thank you. anyway, how did you come with that? Edited May 18, 2009 by mrmacadamia Link to comment Share on other sites More sharing options...
Mobius Posted May 18, 2009 Share Posted May 18, 2009 (edited) Rules of execution, its not bulletproof but I am glad it helped ya.Also @COMSPEC is only necessary when running True command shell commands, or when using cmd only compliant redirection switches.RespectVladEd: Filenames/paths with spaces should be made illegal at the OS level. *eyes roll clean out of head* Edited May 18, 2009 by Mobius 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