如何根据Windows类型创建注册表项?

时间:2013-09-10 16:19:18

标签: registry inno-setup

我希望我的安装将在64位操作系统中安装注册表项。如果操作系统是32位,它将没有“Wow6432Node ”因为32位Wow6432Node不存在。

第二个问题:Flags: uninsdeletevalue uninsdeletekeyifempty删除已安装的注册表?

感谢您的帮助。

; File created by Converter v.0.1.4 -        10 září 2013ă.,   18 6r.  02 2in. 26 26ec.
Root: HKLM; SubKey: SOFTWARE\Wow6432Node\Electronic Arts\Harry Potter and the Deathly Hallows Part 1; ValueType: string; ValueName: DisplayName; ValueData: Harry Potter and the Deathly Hallows™ - Part 1; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Wow6432Node\Electronic Arts\Harry Potter and the Deathly Hallows Part 1; ValueType: string; ValueName: CD Drive; ValueData: E:\; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Wow6432Node\Electronic Arts\Harry Potter and the Deathly Hallows Part 1; ValueType: string; ValueName: ProductName; ValueData: Harry Potter and the Deathly Hallows™ - Part 1; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Wow6432Node\Electronic Arts\Harry Potter and the Deathly Hallows Part 1; ValueType: string; ValueName: Folder; ValueData: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Electronic Arts\Harry Potter and the Deathly Hallows(TM) - Part 1\; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Wow6432Node\Electronic Arts\Harry Potter and the Deathly Hallows Part 1; ValueType: string; ValueName: Install Dir; ValueData: C:\Program Files (x86)\Electronic Arts\Harry Potter and the Deathly Hallows(TM) - Part 1\; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Wow6432Node\Electronic Arts\Harry Potter and the Deathly Hallows Part 1; ValueType: string; ValueName: Installed From; ValueData: E:\; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Wow6432Node\Electronic Arts\Harry Potter and the Deathly Hallows Part 1; ValueType: string; ValueName: Locale; ValueData: en_UK; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Wow6432Node\Electronic Arts\Harry Potter and the Deathly Hallows Part 1; ValueType: string; ValueName: Language; ValueData: English (UK); Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Wow6432Node\Electronic Arts\Harry Potter and the Deathly Hallows Part 1; ValueType: string; ValueName: Product GUID; ValueData: {{C9AAF970-4E7E-4C98-AD67-09C74379D345}; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Wow6432Node\Electronic Arts\Harry Potter and the Deathly Hallows Part 1; ValueType: string; ValueName: Suppression Exe; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Wow6432Node\Electronic Arts\Harry Potter and the Deathly Hallows Part 1; ValueType: string; ValueName: Registration; ValueData: Software\Electronic Arts\Electronic Arts\Harry Potter and the Deathly Hallows Part 1\ergc; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Wow6432Node\Electronic Arts\Harry Potter and the Deathly Hallows Part 1\1.0; ValueType: string; ValueName: DisplayName; ValueData: Harry Potter and the Deathly Hallows Part 1; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Wow6432Node\Electronic Arts\Harry Potter and the Deathly Hallows Part 1\1.0; ValueType: dword; ValueName: Language; ValueData: $00000013; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Wow6432Node\Electronic Arts\Harry Potter and the Deathly Hallows Part 1\1.0; ValueType: string; ValueName: LanguageName; ValueData: English (UK); Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Wow6432Node\Electronic Arts\Harry Potter and the Deathly Hallows Part 1\1.0; ValueType: string; ValueName: ProgramGroup; ValueData: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Electronic Arts\; Flags: uninsdeletevalue uninsdeletekeyifempty
; time elapsed:      4 msec.

1 个答案:

答案 0 :(得分:2)

Ist问题:如果你想在64/32位安装注册表(你的应用程序),那么只需删除 <html ng-app='app'> <head> <script data-require="angular.js@1.4.3" data-semver="1.4.3" src="https://code.angularjs.org/1.4.3/angular.js"></script> <script data-require="angular-cookies.js@1.4.3" data-semver="1.4.3" src="https://code.angularjs.org/1.4.3/angular-cookies.js"></script> <script src="script.js"></script> <script src="helper.js"></script> </head> <body ng-controller="ctrl"> <button onclick="helper.getCookies()">Click Me</button> </body> </html> 部分。没有任何疑问。 Wow6432Node 部分将自动以64位创建。 这么简单吗?是的!

第二个问题:我不知道会Wow6432Node删除注册表,但最好将Flags: uninsdeletevalue uninsdeletekeyifempty用于单个 注册表中。使用Flags: uninsdeletekey,您可以删除Flags: uninsdeletekeyifempty部分,这些部分不会被Electronic Arts删除,但您可以通过这种方式删除。

请查看示例注册表脚本:

Flags: uninsdeletekey