Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simply starting an application via vbscript

Status
Not open for further replies.

RoMa68

Technical User
Feb 7, 2006
27
DE
Hi all,
typing this:
<<c:\sols\runt2007_02_19\lim\startapp.bat PPLIQ300>>
into the run-box in WinXP the application starts

but how should this look like in scripting??

this does not work:
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "c:\sols\runt2007_02_19\lim\startapp.bat ""PPLIQ300""", , True

Any ideas?

Thanks MR
 
What if you try....

Code:
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "%comspec% /c c:\sols\runt2007_02_19\lim\startapp.bat PPLIQ300", , True

--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
Hi dm4ever,

option /c (WshShell.Run "%comspec% /c ) changes something with this cmdbox so that further commands in this startapp.bat cannot be interpreted. Removing this /c only a cmdbox is opened!?

MR
 
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run """c:\sols\runt2007_02_19\lim\startapp.bat PPLIQ300", , True
 
wait, that was wrong, i meant
Code:
Set WshShell  = WScript.CreateObject("WScript.Shell")
WshShell.Run """c:\sols\runt2007_02_19\lim\startapp.bat"" PPLIQ300", , True
 
...not yet - I already reached this point.

i added a set and a pause command into this batch just to show me the environment parameters (ok) - so the call should work, but I get this:

>>>>
Drücken Sie eine beliebige Taste . . .
Unzulässiger Parameter - baud=9600
Der Befehl ".." ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
<<<<

this is the part of the *.bat:
--- schnipp ---
rem For Eltron-TLP:
if NOT %LABEL_LAYOUT_EXTENSION%==prl goto :NoEltron
MODE %ETIKETTEN_PRINTER%: baud=9600 parity=n data=8 stop=1 to=on xon=on dtr=on octs=on odsr=on
goto :NoLabelPrinter
--- schnapp ---

Big question mark...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top