Postbuild_img2. VBS script (parameters for the three paths) calls a bat script, and the parameter passed to bat, as a means of debugging, bat has pause and echo, the VBS msgbox, can seem to have been run before, do not know how suddenly there is something wrong with recently, characterized by directly run the VBS, VBS msgbox all pop up, but didn't see bat run (no pause in the bat and the echo), if directly on the command line run the bat is no problem, doubt is computer environment, please help to look at,
Operating instructions are as follows:
C: \ Users \ A> Postbuild_img2. VBS C: C: \ \ Debug (only pop-up box, do not run the bat)
C: \ Users \ A> Postbuild_img2. Bat C: C: \ \ Debug (normal operation of the bat)
Two script code below
file 1:
Postbuild_img2. VBS:
Dim WshShell
The Set WshShell=WScript. CreateObject (" WScript. Shell ")
MsgBox (" [Ryan] ")
MsgBox (WScript. The Arguments. The Item (0))
MsgBox (WScript. The Arguments. The Item (1))
MsgBox (WScript. The Arguments. The Item (2))
MsgBox (" [start] ")
WshShell. Run CMD/c "c: \ Users \ 212781028 \ Ryan \ postbuild_img2 bat" + WScript. The Arguments. The Item (0) + "" + WScript. The Arguments. The Item (1) +" "+ WScript. The Arguments. The Item (2), and 0
MsgBox (" [over] ")
file 2
Postbuild_img2. Bat:
CD/D % 2
The set tooldir=% 2... Omit
The set libdir=% 2,... Omit
The set cfgdir=% 3
Echo config % 3
. Omit the subsequent code
CodePudding user response:
C: \ DebugParameters in whether have Spaces, special characters, "" quotes
CodePudding user response: