如何在安装和部署中运行“.bat”文件?

时间:2021-09-12 16:03:18

I am newbie creating a setup in visual studio 2010 in which I want to run my example.bat file in which there are two file, one example.exe file and one example2.msi file, I want to run example.bat files now my project creates a shortcut on desktop which run example.bat file. i want when user run the set up so example.bat file should run. How to run first batch file in my setup and deployment project?

我是新手在visual studio 2010中创建一个设置,我想在其中运行我的example.bat文件,其中有两个文件,一个example.exe文件和一个example2.msi文件,我想现在运行example.bat文件我的project在桌面上创建一个运行example.bat文件的快捷方式。我想当用户运行设置时,应该运行example.bat文件。如何在我的设置和部署项目中运行第一批文件?

1 个解决方案

#1


0  

Bundle the .bat file with your setup project and call it in the Custom Action. Custom Actions allows you to specify additional actions to be performed on the target computer at the end of an installation. Please refer the following links.

将.bat文件与安装项目捆绑在一起,并在自定义操作中调用它。自定义操作允许您指定在安装结束时要在目标计算机上执行的其他操作。请参考以下链接。

http://msdn.microsoft.com/en-us/library/d9k65z2d%28VS.80%29.aspx

Executing a script file from a Windows Installer Custom Action

从Windows Installer自定义操作执行脚本文件

#1


0  

Bundle the .bat file with your setup project and call it in the Custom Action. Custom Actions allows you to specify additional actions to be performed on the target computer at the end of an installation. Please refer the following links.

将.bat文件与安装项目捆绑在一起,并在自定义操作中调用它。自定义操作允许您指定在安装结束时要在目标计算机上执行的其他操作。请参考以下链接。

http://msdn.microsoft.com/en-us/library/d9k65z2d%28VS.80%29.aspx

Executing a script file from a Windows Installer Custom Action

从Windows Installer自定义操作执行脚本文件