将参数传递给ajaxminfy [英] passing parameters to ajaxminfy
本文介绍了将参数传递给ajaxminfy的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个下面的脚本,我使用vbscript来调用ajaxminy exe ..我收到一个错误消息,表示期望为'('.有人可以看一下并告诉我出了什么问题.stroutput1和outputpath是变量,我想传递给脚本.
I have this below script that I use to call the ajaxminy exe using a vbscript ..I am getting an error saying expected '(' .Can someone please look at it and tell me what's wrong.stroutput1 and outputpath are variables that I want to pass in to the script.
Dim objShell
Set objShell = WScript.CreateObject( "WScript.Shell" )
objShell.Run(""C:\Program Files (x86)\Microsoft\Microsoft Ajax Minifier\AjaxMin.exe"" stroutput1 -o outputpath)
Set objShell = Nothing
WScript.Echo "Complete"
推荐答案
您的报价错误. Run
需要一个命令字符串(用双引号引起来),并且该字符串内的双引号必须加倍以使其转义.更改此:
Your quoting is wrong. Run
expects a command string (enclosed in double quotes), and double quotes inside this string must be doubled to escape them. Change this:
objShell.Run(""C:\Prog...fier\AjaxMin.exe"" stroutput1 -o outputpath)
对此:
objShell.Run """C:\Prog...fier\AjaxMin.exe"" stroutput1 -o outputpath"
并可能附加, 0, True
(隐藏运行并等待命令返回).
and perhaps append , 0, True
(run hidden and wait for the command to return).
这篇关于将参数传递给ajaxminfy的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文