Inno Setup

0

Mam 2 pytania mianowicie :

  1. Co trzeba dopisać do skryptu, aby podczas instalowania dodawana była wartość do rejestru.
  2. Co trzeba dopisać do skryptu, aby podczas odstalowania usuwana była wartość z rejestru.
0

Znalazłem tylko to:

<font color="green">his optional section defines any registry keys/values you would like Setup to create, modify, or delete on the user's system.
By default, registry keys and values created by Setup are not deleted at uninstall time. If you want the uninstaller to delete keys or values, you must include one of the uninsdelete* flags described below.
The following is an example of a [Registry] section.

[Registry]
Root: HKCU; Subkey: "Software\My Company"; Flags: uninsdeletekeyifempty
Root: HKCU; Subkey: "Software\My Company\My Program"; Flags: uninsdeletekey
Root: HKLM; Subkey: "Software\My Company"; Flags: uninsdeletekeyifempty
Root: HKLM; Subkey: "Software\My Company\My Program"; Flags: uninsdeletekey
Root: HKLM; Subkey: "Software\My Company\My Program"; ValueType: string; ValueName: "InstallPath"; ValueData: "{app}"

The following is a list of the supported parameters:

Root (Required)
Description:
The root key. This must be one of the following:
HKCR (HKEY_CLASSES_ROOT)
HKCU (HKEY_CURRENT_USER)
HKLM (HKEY_LOCAL_MACHINE)
HKU (HKEY_USERS)
HKCC (HKEY_CURRENT_CONFIG)
Example:
Root: HKCU
Subkey (Required)
Description:
The subkey name, which can include constants.
Example:
Subkey: "Software\My Company\My Program"

ValueType
Description:
The data type of the value. This must be one of the following:
none
string
expandsz
multisz
dword
binary
If none (the default setting) is specified, Setup will create the key but not a value. In this case the ValueName and ValueData parameters are ignored.
If string is specified, Setup will create a string (REG_SZ) value.
If expandsz is specified, Setup will create an expand-string (REG_EXPAND_SZ) value. This data type is primarily used on Windows NT/2000/XP, but is supported by Windows 95/98/Me.
If multisz is specified, Setup will create an multi-string (REG_MULTI_SZ) value.
If dword is specified, Setup will create an integer (REG_DWORD) value.
If binary is specified, Setup will create a binary (REG_BINARY) value.

Example:
ValueType: string
ValueName
Description:
The name of the value to create, which can include constants. If this is blank, it will write to the "Default" value. If the ValueType parameter is set to none, this parameter is ignored.
Example:
ValueName: "Version"
ValueData
Description:
The data for the value. If the ValueType parameter is string, expandsz, or multisz, this is a string that can include constants. If the data type is dword, this can be a decimal integer (e.g. "123"), a hexadecimal integer (e.g. "$7B"), or a constant which resolves to an integer. If the data type is binary, this is a sequence of hexadecimal bytes in the form: "00 ff 12 34". If the data type is none, this is ignored.

On a string, expandsz, or multisz type value, you may use a special constant called {olddata} in this parameter. {olddata} is replaced with the previous data of the registry value. The {olddata} constant can be useful if you need to append a string to an existing value, for example, {olddata};{app}. If the value does not exist or the existing value isn't a string type, the {olddata} constant is silently removed. {olddata} will also be silently removed if the value being created is a multisz type but the existing value is not a multi-string type (i.e. it's REG_SZ or REG_EXPAND_SZ), and vice versa.

On a multisz type value, you may use a special constant called {break} in this parameter to embed line breaks (nulls).
Example:
ValueData: "1.0"
Permissions
Description:
Specifies additional permissions to grant in the registry key's ACL (access control list). It is not recommended that you use this parameter if you aren't familiar with ACLs or why you would need to change them, because misusing it could negatively impact system security.

For this parameter to have an effect the user must be running Windows 2000 or later (NT 4.0 is not supported due to API bugs) and the current user must be able to change the permissions on the registry key. In the event these conditions are not met, no error message will be displayed, and the permissions will not be set.
This parameter should only be used on registry keys private to your application. Never change the ACLs on a top-level key like HKEY_LOCAL_MACHINE\SOFTWARE, otherwise you can open up security holes on your users' systems.

The specified permissions are set regardless of whether the registry key existed prior to installation. The permissions are not set if ValueType is none and the deletekey flag or deletevalue flag is used.
This parameter can include one or more space separated values in the format:
<user or="or" group="group" identifier="identifier">-<access type="type">
The following access types are supported for the [Registry] section:

full
Grants "Full Control" permission, which is the same as modify (see below), but additionally allows the specified user/group to take ownership of the registry key and change its permissions. Use sparingly; generally, modify is sufficient.
modify
Grants "Modify" permission, which allows the specified user/group to read, create, modify, and delete values and subkeys.
read
Grants "Read" permission, which allows the specified user/group to read values and subkeys.

Example:
Permissions: authusers-modify
Flags
Description:
This parameter is a set of extra options. Multiple options may be used by separating them by spaces. The following options are supported:

createvalueifdoesntexist
When this flag is specified, Setup will create the value only if a value of the same name doesn't already exist. This flag has no effect if the data type is none, or if you specify the deletevalue flag.
deletekey
When this flag is specified, Setup will first try deleting the entire key if it exists, including all values and subkeys in it. If ValueType is not none, it will then create a new key and value.

To prevent disasters, this flag is ignored during installation if Subkey is blank or contains only backslashes.
deletevalue
When this flag is specified, Setup will first try deleting the value if it exists. If ValueType is not none, it will then create the key if it didn't already exist, and the new value.
dontcreatekey
When this flag is specified, Setup will not attempt to create the key or any value if the key did not already exist on the user's system. No error message is displayed if the key does not exist.

Typically this flag is used in combination with the uninsdeletekey flag, for deleting keys during uninstallation but not creating them during installation.
noerror
Don't display an error message if Setup fails to create the key or value for any reason.
preservestringtype
This is only applicable when the ValueType parameter is string or expandsz. When this flag is specified and the value did not already exist or the existing value isn't a string type (REG_SZ or REG_EXPAND_SZ), it will be created with the type specified by ValueType. If the value did exist and is a string type, it will be replaced with the same value type as the pre-existing value.

uninsclearvalue
When the program is uninstalled, set the value's data to a null string (type REG_SZ). This flag cannot be combined with the uninsdeletekey flag.
uninsdeletekey
When the program is uninstalled, delete the entire key, including all values and subkeys in it. It obviously wouldn't be a good idea to use this on a key that is used by Windows itself. You should only use this on keys private to your application.
To prevent disasters, this flag is ignored during installation if Subkey is blank or contains only backslashes.

uninsdeletekeyifempty
When the program is uninstalled, delete the key if it has no values or subkeys left in it. This flag can be combined with uninsdeletevalue.
To prevent disasters, this flag is ignored during installation if Subkey is blank or contains only backslashes.
uninsdeletevalue
Delete the value when the program is uninstalled. This flag can be combined with uninsdeletekeyifempty.
NOTE: In Inno Setup versions prior to 1.1, you could use this flag along with the data type none and it would function as a "delete key if empty" flag. This technique is no longer supported. You must now use the uninsdeletekeyifempty flag to accomplish this.

Example:
Flags: uninsdeletevalue </span>

0

Kolejny raz wielkie dzięki @~~ Jakbyś mógł dać linka do tego to był bym wdzięczny (żeby w przyszłości nie zaśmiecać forum)

0

Zajrzałem do helpa :>

1 użytkowników online, w tym zalogowanych: 0, gości: 1