3

我只是想知道在安装应用程序时是否可以只运行一次小代码。

我想用安装路径创建一个注册表。我之所以需要它,是因为我的应用程序中也有一个 Windows 服务,它的安装路径总是更改为 system32。

我有一个 ini 文件,它是在安装时在安装文件夹中创建的。我还需要使用我的服务和 Windows 表单来访问该文件。

4

1 回答 1

2

You don't need any extra code, just create a registry key in HKLM\software\yoursoftware-here with a key name like Installpath and a value of [INSTALLDIR] in your install, then reference that key in your service.

This assumes you are using a basic MSI project in install shield.

于 2013-04-06T07:00:57.440 回答