开发者

Running a batch file

开发者 https://www.devze.com 2023-01-14 11:34 出处:网络
How can开发者_如何学C I include a batch file or an .exe file in my setup, that runs after setup is complete?

How can开发者_如何学C I include a batch file or an .exe file in my setup, that runs after setup is complete? Thanks Furqan


It depends on the setup program you are using. The build-in setup programs available in VS Express do not offer such possibility.

If you are looking for a free alternative, have a look at Nullsoft Scriptable Install System. Other than that, you could get away by running the external batch / application file during the first time your application runs:

If My.Application.Deployment.IsFirstRun then
    Process.Start("yourapp.exe")
End If


If it's a Visual Studio Setup Project you can add a custom action. It can't execute batch files, but it can execute scripts and executables and also call functions in some DLLs.

Here's an article with more details: Visual Studio Setup - projects and custom actions

Be aware though, it's usually not recommended to run scripts.

0

精彩评论

暂无评论...
验证码 换一张
取 消