2015-11-19 42 views

回答

0

最简单的方法是使用.vbs脚本来设置环境变量,然后启动应用程序。

例如:

set ws = wscript.createobject("WScript.shell") 
set systemEnv = wshShell.Environment("SYSTEM") 
systemEnv("YourVariable") = "Your value" 
ws.run("notepad.exe"), 0, true 

标志:

0 = Hidden 
1 = displayed 
True = Waits till command has completed before moving to next 
False = Does not wait for command to complete before moving to next 
+0

感谢米哈伊尔,我尝试使用批处理文件来运行它。我能够发布批处理文件,但在尝试下载批处理文件的ica时出现错误。这很容易! – nahzor