Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vbscript 用vb脚本解析批处理文件中的参数_Vbscript_Batch File - Fatal编程技术网

Vbscript 用vb脚本解析批处理文件中的参数

Vbscript 用vb脚本解析批处理文件中的参数,vbscript,batch-file,Vbscript,Batch File,我有一个代码,通过它我可以解析batchscript的地址,它工作正常,但问题是如果我的路径类似于C:\Documents and Settings\himanshu.jain\Desktop\example,那么.bat文件只能读取C:\Documents,有人能告诉我应该是什么问题吗。这是我的密码 Vb脚本代码 variable1="C:\Documents and Settings\himanshu.jain\Desktop\example" objWshell.run "batchfil

我有一个代码,通过它我可以解析batchscript的地址,它工作正常,但问题是如果我的路径类似于
C:\Documents and Settings\himanshu.jain\Desktop\example
,那么.bat文件只能读取
C:\Documents
,有人能告诉我应该是什么问题吗。这是我的密码

Vb脚本代码

variable1="C:\Documents and Settings\himanshu.jain\Desktop\example"
objWshell.run "batchfile.bat "& variable1
set SOURCE=%1
批处理脚本代码

variable1="C:\Documents and Settings\himanshu.jain\Desktop\example"
objWshell.run "batchfile.bat "& variable1
set SOURCE=%1
使用文字引号

variable1="""C:\Documents and Settings\himanshu.jain\Desktop\example"""
双引号转换为文字双引号