简体   繁体   English

在向注册表中的RUN键添加值之前,使安装程序询问(InstallShield)

[英]Making the installer ask before adding value to RUN-key in the registry (InstallShield)

I am creating an installer with InstallShield Limited Edition in VS2012, and want the user to have the choice of having the application start when Windows does. 我正在VS2012中使用InstallShield Limited Edition创建安装程序,并希望用户可以选择在Windows运行时启动应用程序。

The installer currently creates the registry value upon install; 安装程序当前在安装时创建注册表值。

安装程序要添加的注册表值 That's very nice and dandy and it works. 很好,很花哨,可以用。

BUT I feel it's bad practice and not particularly kind on the users to force a startup application upon them. 但是我觉得这是不好的做法,对用户强加给他们一个启动应用程序并不是一种特别的态度。

The user can currently choose to set the setting in the options panel of the (WPF) application, which behind the scenes will register a value in HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run , so the app will start with Windows. 用户当前可以在(WPF)应用程序的选项面板中选择设置设置,该设置将在后台在HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run注册一个值,因此该应用程序将从Windows开始。 However, I would like the user to have the choice of turning this on already at install-time. 但是,我希望用户可以选择在安装时将其打开。

In essence, I want a checkbox sometime during the install user can set, and if the checkbox is set to 'yes', the installer will create the registry key (and if not, well, you know...) 本质上,我希望安装用户在某个时候可以设置一个复选框,如果该复选框设置为“是”,则安装程序将创建注册表项(如果没有,那么您知道...)

How should I go about creating a dialog with a check-box, that would affect whether the registry key was created or not? 我应该如何创建带有复选框的对话框,这将影响是否创建了注册表项?

Why don't you have a tools | 为什么没有工具| options type screen in your app and ask the user there if they would like to have it autorun. 选项在您的应用中输入屏幕,然后询问用户是否希望其自动运行。 That way it's not an installer problem. 这样,这不是安装程序问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM