Sign in to follow this  
Followers 0
mrmacadamia

cmd command help

10 posts in this topic

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

Share this post


Link to post
Share on other sites



Run(@ComSpec & ' /c "C:\Program Files\LiteStep\utilities\wxlua.exe" "C:\Program Files\LiteStep\utilities\LOSS.lua" explorer')

Share this post


Link to post
Share on other sites

Run(@ComSpec & ' /c "C:\Program Files\LiteStep\utilities\wxlua.exe" "C:\Program Files\LiteStep\utilities\LOSS.lua" explorer')
nope, it doesn't work :)

Share this post


Link to post
Share on other sites

And what happen if you run the exact line in the command line?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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%.

Share this post


Link to post
Share on other sites

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%.

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.

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

#10 ·  Posted (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.

Respect

Vlad

Ed: Filenames/paths with spaces should be made illegal at the OS level. *eyes roll clean out of head*

Edited by Mobius

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  
Followers 0