如何安装完成后运行一个批处理脚本? [英] How to run a batch script after installation is finished?

查看:146
本文介绍了如何安装完成后运行一个批处理脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作在Visual Studio 2008开发了一个自定义安装;对于C#项目(安装和功放部署>安装项目)。我想运行安装完成后,一个批处理文件(* .bat)的形式。我该怎么办呢?

I'm working for a custom installer developed in Visual Studio 2008 (Setup & Deployment > Setup project) for a C# project. I'd like to run a batch file (*.bat) after installation is finished. How can I do that?

推荐答案

您将不得不延长的安装类和重写的致力于事件。

You will have to extend the Installer class and override the Committed event.

下面是一个<一个href="http://pietschsoft.com/post/2009/11/06/dotnet-windows-service-installer-and-auto-start-after-installation.aspx"相对=nofollow>例如的。希望你能够找到如何在C#中运行.bat文件。

Here is an example. Hope you will be able to find how to run a .bat file in C#.

自定义安装操作是另一种选择。 这里是,类似的主题。

Custom Install Action is another option. Here is a similar thread for that.

这篇关于如何安装完成后运行一个批处理脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆