如果目录不存在,请通过bat文件安装exe

时间:2012-03-21 22:09:33

标签: batch-file install exe gpo

我正在从GPO中的Windows启动脚本调用bat文件,并认为我的语法可能有错误,任何想法?目的是安装GoToManage无人参与访问程序,但前提是它尚未安装。

@echo off
if EXIST "C:\Program Files (x86)\Citrix\GoToAssist Express Customer" (
    exit
) ELSE (
if EXIST "C:\Program Files\Citrix\GoToAssist Express Customer" (
    exit
) ELSE (
    start \\serv1\SoftwareDeploy\RemoteSupport\RemoteSupport.exe
)

非常感谢任何帮助。

干杯。

1 个答案:

答案 0 :(得分:0)

试试这个:

@echo off
if EXIST "C:\Program Files (x86)\Citrix\GoToAssist Express Customer" GOTO End
if EXIST "C:\Program Files\Citrix\GoToAssist Express Customer" GOTO End

start \\serv1\SoftwareDeploy\RemoteSupport\RemoteSupport.exe

:End
相关问题