Inno Setup-Regedit

Source: Internet
Author: User

[HKEY_LOCAL_MACHINE \ SOFTWARE \ Ubisoft \ prince of Persia the two thrones \ 1.00.999]
"Product_path" = "W: \ prince of Persia t2t"
"Product_executable" = "princeofpersia.exe"
"Product_language" = "9"
"Product_release" = "retail na"
"Profiles_path" = "C: \ Documents ents and Settings \ All Users \ Application Data"
Write this as a script.

 

 

 

[registry]
root: HKLM; subkey: Software \ Ubisoft \ prince of Persia the two thrones \ 1.00.999; valuetype: string; valuename: product_path; valuedata: {app} \ prince of Persia t2t
root: HKLM; subkey: Software \ Ubisoft \ prince of Persia the two thrones \ 1.00.999; valuetype: string; valuename: product_executable; valuedata: princeofpersia.exe
root: HKLM; subkey: Software \ Ubisoft \ prince of Persia the two thrones \ 1.00.999; valuetype: string; valuename: product_language; valuedata: 9
root: HKLM; subkey: Software \ Ubisoft \ prince of Persia the two thrones \ 1.00.999; valuetype: string; valuename: product_release; valuedata: Retail na
root: HKLM; subkey: software \ Ubisoft \ prince of Persia the two thrones \ 1.00.999; valuetype: string; valuename: profiles_path; valuedata: {commonappdata}

To help me explain why "profiles_path" = "C: \ drivers and Settings \ All Users \ Application Data" is the storage path of the game, why should it be written as root: HKLM; subkey: software \ Ubisoft \ prince of Persia the two thrones \ 1.00.999; valuetype: string; valuename: profiles_path; valuedata: {commonappdata?

 

 

Root (required)

Description:
Root Key. It must be one of the following values:

Hkcr (hkey_classes_root)
Hkcu (HKEY_CURRENT_USER)
HKLM (HKEY_LOCAL_MACHINE)
HKU (HKEY_USERS)
HKCC (hkey_current_config)

The value can contain a suffix of 32 or 64. The root key values with 32 suffixes (for example, hklm32) are mapped to the 32-bit system registry, and the root key values with 64 suffixes (for example, hklm32) are mapped to the 64-bit system registry.
The root key with a 64-suffix can only be installedProgramIt is used when running 64-bit windows. Otherwise, an error occurs. In installation programs that support 32-bit and 64-bit structures, this can be avoided by adding the following iswin64 parameter checks. This will automatically skip this entry when running on 32-bit windows.

The root key value without a suffix (for example, HKLM) is equal to the value with a suffix of 32 (for example, hklm32), unless the installer runs in 64-Bit mode, in this case, this value is equal to the value with a suffix of 64 (for example, hklm64 ).
Example:
Root: hkcu

{Commonappdata} (application data folder path) is a shell folder constant
{Commonappdata} = c: \ Documents ents and Settings \ All Users \ Application Data

 

Set flags (additional options) on your own.

Flags

Description:

This parameter is set as an additional option. Multiple options can be separated by spaces. The following options are supported:

Createvalueifdoesntexist

If this tag is specified, the installer creates a value only if the value of the same name does not exist. If the value type is none, or if you specify the deletevalue tag, this tag is invalid.

Deletekey

When this flag is specified, the installer tries to delete it, including all values and subkeys, if the entry exists. If valuetype is not none, a new key and value will be created.

To avoid exceptions, if the Sub-key is blank or only contains the anti-oblique box symbol, this flag is ignored during installation.

Deletevalue

When this flag is specified, the installer will first try to delete the value if the value exists. If valuetype is none, then if the key does not exist, it creates a key and a new value.

Dontcreatekey

If this flag is specified and the key does not exist in the user system, the installer will not try to create a key or value. If the key does not exist, no error message is displayed.

Generally, this key is used in combination with the uninsdeletekey tag. The key is deleted during uninstallation, but no key is created during installation.

Noerror

If the installer fails to create a key or value for any reason, no error message is displayed.

Preservestringtype

This applies only when the valuetype parameter is string or expandsz. If this flag is specified and the value does not exist or the existing value is not of the string type (REG_SZ or reg_expand_sz), it will be created with the type specified by valuetype. If the value exists and is of the string type, it will be replaced with the same value type that already exists.

Uninsclearvalue

When the program is uninstalled, set the value data to a null character (type: reg_sz ). This tag cannot be combined with the uninsdeletekey tag.

Uninsdeletekey

When you Uninstall a program, delete the entire key, including all values and subkeys. This is obviously not a good method for keys used by Windows itself. You can only use the key that is unique to your application.

To prevent exceptions, this flag is ignored if the child key is blank or contains only the reverse box symbol during installation.

Uninsdeletekeyifempty

When the program is uninstalled, if the key has no internal value or sub-key, the key is deleted. This tag can be used in combination with uninsdeletevalue.

To prevent exceptions, this flag is ignored if the child key is blank or contains only the reverse box symbol during installation.

Uninsdeletevalue

This value is deleted when the program is uninstalled. This tag cannot be combined with uninsdeletekeyifempty.

Note: In Inno Setup versions earlier than 1.1, you can use this tag along with the Data Type none, so its function is the same as the "delete key if empty" tag. This method is no longer supported. You must use the uninsdeletekeyifempty tag.

Example:
Flags: uninsdeletevalue

 

 

 

[Registry]
// HKEY-LOCAL-MACHINE software gDW sicts SICTS-CLIENT 3.1.1.0 product_path D: \ Program Files \ sicts-Client
// Delete the object upon uninstallation
Root: HKLM; subkey: Software \ gDW \ sicts \ SICTS-CLIENT \ 3.1.1.0; valuetype: string; valuename: product_path; valuedata: {app}; flags: uninsdeletevalue

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.