| |
| | |||||||
| Windows XP Discuss the Microsoft Windows XP Operating System |
| | LinkBack | Thread Tools |
| |||
| calling cmd.exe file with arguments Hi, I have the following code: C:\WINDOWS\system32\cmd.exe /C "C:\Program Files\FindAndRunRobot \Plugins\TodoTXT\dist\todo.exe a test" I want to call todo.exe with a parameter "a test". How to do it correctly? Thank you Oldrich Svec |
| |||
| Re: calling cmd.exe file with arguments Do you want the command window to stay open? cmd.exe /C Carries out the command specified by string and then terminates cmd.exe /K Carries out the command specified by string but remains Your quote is in the wrong place. Only quote the path, not switches. C:\WINDOWS\system32\cmd.exe /C "C:\Program Files\FindAndRunRobot \Plugins\TodoTXT\dist\todo.exe" a test ju.c "czechboy" <oldrich.svec@centrum.cz> wrote in message news:2d4d3b6f-08f3-4e01-aa20-530437222c37@f36g2000hsa.googlegroups.com... > Hi, > I have the following code: > > C:\WINDOWS\system32\cmd.exe /C "C:\Program Files\FindAndRunRobot > \Plugins\TodoTXT\dist\todo.exe a test" > > I want to call todo.exe with a parameter "a test". How to do it > correctly? > Thank you > Oldrich Svec |
| |||
| Re: calling cmd.exe file with arguments "czechboy" <oldrich.svec@centrum.cz> wrote in message news:2d4d3b6f-08f3-4e01-aa20-530437222c37@f36g2000hsa.googlegroups.com... > Hi, > I have the following code: > > C:\WINDOWS\system32\cmd.exe /C "C:\Program Files\FindAndRunRobot > \Plugins\TodoTXT\dist\todo.exe a test" > > I want to call todo.exe with a parameter "a test". How to do it > correctly? > Thank you > Oldrich Svec You have a couple of options: - The simple way: "C:\Program Files\FindAndRunRobot\Plugins\TodoTXT\dist\todo.ex e" "a test" (There is no need to invoke an extra Command Processor) - Making life harder for yourself: C:\WINDOWS\system32\cmd.exe /C "C:\Program Files\FindAndRunRobot\Plugins\TodoTXT\dist\todo.ex e" "a test" |
| |||
| Re: calling cmd.exe file with arguments Thank you for your answer. I want to call a program from jscript by oShell.Run(command, 0, true) The problem I have now is that if the following "C:\Program Files\FindAndRunRobot\Plugins\TodoTXT\dist\todo.ex e" a test > "C:\Program Files\FindAndRunRobot\Plugins\TodoTXT\temp.tmp" is my "command" variable then it treats ">" as another parameter for todo.exe, but I want to output the result into the temp.tmp file. The same is with: "C:\Program Files\FindAndRunRobot\Plugins\TodoTXT\dist\todo.ex e" "a" "test" > "C:\Program Files\FindAndRunRobot\Plugins\TodoTXT\temp.tmp" If I try "C:\Program Files\FindAndRunRobot\Plugins\TodoTXT\dist\todo.ex e" "a test" > "C:\Program Files\FindAndRunRobot\Plugins\TodoTXT\temp.tmp" todo.exe treats it badly... |
| |||
| Re: calling cmd.exe file with arguments I have even tried C:\WINDOWS\system32\cmd.exe /C "C:\Program Files\FindAndRunRobot \Plugins\TodoTXT\dist\todo.exe" a skola > "C:\Program Files \FindAndRunRobot\Plugins\TodoTXT\temp.tmp" and it works when called from xplorer2, but it doesnt work when called from jscript.. I am quite lost :) |
| |||
| Re: calling cmd.exe file with arguments "ernperkins" <ernperkins@msn.com> wrote in message news:ernperkins.3bdku7@no-mx.tabletquestions.com... > > I'm having the same exact problem. What was the solution? > > Thanks, > Ed Perkins > > > -- > ernperkins I assume you're referring to a thread that is more than two months old. Since you removed all of the original text, it is not possible to be sure. Have a look here - maybe this is what you're after: calling cmd.exe file with arguments |
| Bookmarks |
| Thread Tools | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Invalid Command Line arguments??? | Jenna | Windows Vista | 11 | 09-09-2007 02:50 AM |
| DCOM starts services "with arguments" (LOL) | FlutterBy | Windows Vista | 1 | 06-22-2007 06:30 AM |
| Calling an MVP | janet-m | Windows XP | 17 | 06-20-2007 11:40 AM |
| XP problem passing command arguments with spaces | Ron G | Windows XP | 3 | 01-21-2007 07:30 AM |
| Passing command line arguments | Cornel Gligan | Pocket PC General | 2 | 01-15-2007 09:53 AM |
| New To Technology Questions? | Do You Need Help? |