Command Prompt code misbehaving in VBS

Command Prompt code misbehaving in VBS

Post by MV » Thu, 28 Feb 2008 05:06:35


Assuming that a tried and proven application is "misbehaving"
usually leads you down the wrong track, increasing the pain
of trouble-shooting. In this case your code simply lacks a few
double-quotes to satisfy the Command Processor. Try this:

DQ=""""
strshell.run DQ & "c:\Program Files\Microsoft ActiveSync\CEAPPMGR.EXE" _
& DQ & " " & DQ & "d:\Some Folder\helloworldproject.ini" & DQ


"catsAreMyFriends" < XXXX@XXXXX.COM > wrote in
 
 
 

Command Prompt code misbehaving in VBS

Post by Mik » Thu, 28 Feb 2008 05:39:53


Many thanks Pegasus!! That fixed it!

 
 
 

Command Prompt code misbehaving in VBS

Post by ekkehard.h » Thu, 28 Feb 2008 06:18:37

Pegasus (MVP) schrieb:

[...]

The therapy is proven to be correct, but I doubt the diagnosis. Regarding
the quotes there is no difference between the commands. So I assume using
the full path to the .ini file did the trick.

(I wouldn't nit pick a working solution but for two reasons: I my opinion
using the VBScript escape "" for " in literals is a valid method that
shouldn't be suspected unwarrentedly; path/current folder problems when
using .Run or .Exec are *** and deserve attention/research.)