Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have different Windows uninstall keys for different Julia versions #40163

Merged
merged 3 commits into from
Mar 25, 2021
Merged

Have different Windows uninstall keys for different Julia versions #40163

merged 3 commits into from
Mar 25, 2021

Conversation

jaakkor2
Copy link
Contributor

@jaakkor2 jaakkor2 commented Mar 24, 2021

Should fix #40004. Have the uninstall key to be "{#AppNameLong}_is1" where AppNameLong contains the Julia version to prevent Windows from overwriting the uninstall information for different Julia versions.

Inno Setup documentation about the AppId https://jrsoftware.org/ishelp/topic_setup_appid.htm copied here for convenience

[Setup]: AppId

Default value: AppName

Description:

The value of AppId is stored inside uninstall log files (unins???.dat), and is checked by subsequent installations to determine whether it may append to a particular existing uninstall log. Setup will only append to an uninstall log if the AppId of the existing uninstall log is the same as the current installation's AppId. For a practical example, say you have two installations -- one entitled My Program and the other entitled My Program 1.1 Update. To get My Program 1.1 Update to append to My Program's uninstall log, you would have to set AppId to the same value in both installations.

AppId also determines the actual name of the Uninstall registry key, to which Inno Setup tacks on "_is1" at the end. (Therefore, if AppId is "MyProgram", the key will be named "MyProgram_is1".) Pre-1.3 versions of Inno Setup based the key name on the value of AppVerName.

AppId is a not used for display anywhere, so feel free to make it as cryptic as you desire. The value may include constants.

If you use a {code:..} constant to allow your user to customize AppId, you do not need to return the real value until just before the installation starts: if necessary you may return an empty or generic value at earlier times. If not empty, this value will only be used to attempt to restore previous install settings (like the settings stored by [Setup] section directive UsePreviousAppDir). If empty, it isn't used for anything.

The length of AppId with all constants evaluated should never exceed 127 characters.

Example:

AppId=MyProgram

closes #36933

Should fix #40004.  Have the uninstall key to be "{#AppNameLong}_is1" where AppNameLong contains the Julia version to prevent Windows from overwriting the uninstall information for different Julia versions.

Inno Setup documentation about the AppId https://jrsoftware.org/ishelp/topic_setup_appid.htm copied here for convenience
```
[Setup]: AppId

Default value:
	
AppName
Description:

The value of AppId is stored inside uninstall log files (unins???.dat), and is checked by subsequent installations to determine whether it may append to a particular existing uninstall log. Setup will only append to an uninstall log if the AppId of the existing uninstall log is the same as the current installation's AppId. For a practical example, say you have two installations -- one entitled My Program and the other entitled My Program 1.1 Update. To get My Program 1.1 Update to append to My Program's uninstall log, you would have to set AppId to the same value in both installations.

AppId also determines the actual name of the Uninstall registry key, to which Inno Setup tacks on "_is1" at the end. (Therefore, if AppId is "MyProgram", the key will be named "MyProgram_is1".) Pre-1.3 versions of Inno Setup based the key name on the value of AppVerName.

AppId is a not used for display anywhere, so feel free to make it as cryptic as you desire. The value may include constants.

If you use a {code:..} constant to allow your user to customize AppId, you do not need to return the real value until just before the installation starts: if necessary you may return an empty or generic value at earlier times. If not empty, this value will only be used to attempt to restore previous install settings (like the settings stored by [Setup] section directive UsePreviousAppDir). If empty, it isn't used for anything.

The length of AppId with all constants evaluated should never exceed 127 characters.
Example:

AppId=MyProgram
```
@jaakkor2
Copy link
Contributor Author

jaakkor2 commented Mar 24, 2021

I installed https://julialangnightlies-s3.julialang.org/assert_pretesting/winnt/x64/1.7/julia-7b60ed4753-win64.exe and now Windows registry shows two uninstall keys for Julia

Computer\HKEY_USERS\...\Software\Microsoft\Windows\CurrentVersion\Uninstall\{054B4BC6-BD30-45C8-A623-8F5BA6EBD55D}_is1
Computer\HKEY_USERS\...\Software\Microsoft\Windows\CurrentVersion\Uninstall\Julia 1.7.0-DEV_is1

The former for Julia 1.6.0-rc3 and the latter for Julia 1.7.0-DEV.

Similarly, Add or remove programs shows now two entries for Julia
image

In conclusion, the fix seems to be working fine.

@KristofferC KristofferC requested a review from musm March 24, 2021 06:47
@musm
Copy link
Contributor

musm commented Mar 24, 2021

This is one way to solve the problem. This essentially makes every new version of Julia a unique program. I've thought about doing this before. I think it's fine, but consider the tradeoffs. Auto-upgrading Julia through the Inno installer is going to be difficult, since the newer version is treated as separate program (they'll have different reg keys).

So I guess another way of saying this is that if we implemented an auto-updater, this would make that harder to implement. If we don't care about that and are fine with parallel installs then this should be fine.

@musm
Copy link
Contributor

musm commented Mar 24, 2021

Basically, every version of Julia (major,minor,patch, rc candidate, dev version) installed is going to have a separate entry and it will be the user's responsibility to remove the older versions.

@KristofferC I think we might want to backport this to the 1.6 branch.

@KristofferC KristofferC added the backport 1.6 Change should be backported to release-1.6 label Mar 24, 2021
Co-authored-by: Mustafa M <mus-m@outlook.com>
@musm musm added the merge me PR is reviewed. Merge when all tests are passing label Mar 24, 2021
@jebej
Copy link
Contributor

jebej commented Mar 24, 2021

Basically, every version of Julia (major,minor,patch, rc candidate, dev version) installed is going to have a separate entry and it will be the user's responsibility to remove the older versions.

I think that's the best way to do this. It's a common use case to have multiple versions installed in parallel.

@musm musm merged commit e2f5f26 into JuliaLang:master Mar 25, 2021
@jaakkor2 jaakkor2 deleted the patch-1 branch March 25, 2021 06:14
KristofferC pushed a commit that referenced this pull request Mar 26, 2021
…40163)

* Have different Windows uninstall keys for different Julia versions

Should fix #40004.  Have the uninstall key to be "{#AppNameLong}_is1" where AppNameLong contains the Julia version to prevent Windows from overwriting the uninstall information for different Julia versions.

Inno Setup documentation about the AppId https://jrsoftware.org/ishelp/topic_setup_appid.htm copied here for convenience
```
[Setup]: AppId

Default value:

AppName
Description:

The value of AppId is stored inside uninstall log files (unins???.dat), and is checked by subsequent installations to determine whether it may append to a particular existing uninstall log. Setup will only append to an uninstall log if the AppId of the existing uninstall log is the same as the current installation's AppId. For a practical example, say you have two installations -- one entitled My Program and the other entitled My Program 1.1 Update. To get My Program 1.1 Update to append to My Program's uninstall log, you would have to set AppId to the same value in both installations.

AppId also determines the actual name of the Uninstall registry key, to which Inno Setup tacks on "_is1" at the end. (Therefore, if AppId is "MyProgram", the key will be named "MyProgram_is1".) Pre-1.3 versions of Inno Setup based the key name on the value of AppVerName.

AppId is a not used for display anywhere, so feel free to make it as cryptic as you desire. The value may include constants.

If you use a {code:..} constant to allow your user to customize AppId, you do not need to return the real value until just before the installation starts: if necessary you may return an empty or generic value at earlier times. If not empty, this value will only be used to attempt to restore previous install settings (like the settings stored by [Setup] section directive UsePreviousAppDir). If empty, it isn't used for anything.

The length of AppId with all constants evaluated should never exceed 127 characters.
Example:

AppId=MyProgram
```

* Use DirName as AppId

Co-authored-by: Mustafa M <mus-m@outlook.com>

* remove unneeded code

Co-authored-by: Mustafa M <mus-m@outlook.com>
(cherry picked from commit e2f5f26)
@KristofferC KristofferC mentioned this pull request Mar 26, 2021
33 tasks
@no-trick-pony
Copy link

Could you help me out on how to uninstall version 1.5.3 that's now left without an uninstaller in my system?

@no-trick-pony
Copy link

Ah.. the uninstaller is still there, physically C:\Users\<username>\AppData\Local\Programs\Julia 1.5.3\uninstall

@simeonschaub simeonschaub removed the merge me PR is reviewed. Merge when all tests are passing label Apr 3, 2021
KristofferC pushed a commit that referenced this pull request Apr 4, 2021
…40163)

* Have different Windows uninstall keys for different Julia versions

Should fix #40004.  Have the uninstall key to be "{#AppNameLong}_is1" where AppNameLong contains the Julia version to prevent Windows from overwriting the uninstall information for different Julia versions.

Inno Setup documentation about the AppId https://jrsoftware.org/ishelp/topic_setup_appid.htm copied here for convenience
```
[Setup]: AppId

Default value:

AppName
Description:

The value of AppId is stored inside uninstall log files (unins???.dat), and is checked by subsequent installations to determine whether it may append to a particular existing uninstall log. Setup will only append to an uninstall log if the AppId of the existing uninstall log is the same as the current installation's AppId. For a practical example, say you have two installations -- one entitled My Program and the other entitled My Program 1.1 Update. To get My Program 1.1 Update to append to My Program's uninstall log, you would have to set AppId to the same value in both installations.

AppId also determines the actual name of the Uninstall registry key, to which Inno Setup tacks on "_is1" at the end. (Therefore, if AppId is "MyProgram", the key will be named "MyProgram_is1".) Pre-1.3 versions of Inno Setup based the key name on the value of AppVerName.

AppId is a not used for display anywhere, so feel free to make it as cryptic as you desire. The value may include constants.

If you use a {code:..} constant to allow your user to customize AppId, you do not need to return the real value until just before the installation starts: if necessary you may return an empty or generic value at earlier times. If not empty, this value will only be used to attempt to restore previous install settings (like the settings stored by [Setup] section directive UsePreviousAppDir). If empty, it isn't used for anything.

The length of AppId with all constants evaluated should never exceed 127 characters.
Example:

AppId=MyProgram
```

* Use DirName as AppId

Co-authored-by: Mustafa M <mus-m@outlook.com>

* remove unneeded code

Co-authored-by: Mustafa M <mus-m@outlook.com>
(cherry picked from commit e2f5f26)
KristofferC pushed a commit that referenced this pull request Apr 4, 2021
…40163)

* Have different Windows uninstall keys for different Julia versions

Should fix #40004.  Have the uninstall key to be "{#AppNameLong}_is1" where AppNameLong contains the Julia version to prevent Windows from overwriting the uninstall information for different Julia versions.

Inno Setup documentation about the AppId https://jrsoftware.org/ishelp/topic_setup_appid.htm copied here for convenience
```
[Setup]: AppId

Default value:

AppName
Description:

The value of AppId is stored inside uninstall log files (unins???.dat), and is checked by subsequent installations to determine whether it may append to a particular existing uninstall log. Setup will only append to an uninstall log if the AppId of the existing uninstall log is the same as the current installation's AppId. For a practical example, say you have two installations -- one entitled My Program and the other entitled My Program 1.1 Update. To get My Program 1.1 Update to append to My Program's uninstall log, you would have to set AppId to the same value in both installations.

AppId also determines the actual name of the Uninstall registry key, to which Inno Setup tacks on "_is1" at the end. (Therefore, if AppId is "MyProgram", the key will be named "MyProgram_is1".) Pre-1.3 versions of Inno Setup based the key name on the value of AppVerName.

AppId is a not used for display anywhere, so feel free to make it as cryptic as you desire. The value may include constants.

If you use a {code:..} constant to allow your user to customize AppId, you do not need to return the real value until just before the installation starts: if necessary you may return an empty or generic value at earlier times. If not empty, this value will only be used to attempt to restore previous install settings (like the settings stored by [Setup] section directive UsePreviousAppDir). If empty, it isn't used for anything.

The length of AppId with all constants evaluated should never exceed 127 characters.
Example:

AppId=MyProgram
```

* Use DirName as AppId

Co-authored-by: Mustafa M <mus-m@outlook.com>

* remove unneeded code

Co-authored-by: Mustafa M <mus-m@outlook.com>
(cherry picked from commit e2f5f26)
@KristofferC KristofferC removed the backport 1.6 Change should be backported to release-1.6 label May 4, 2021
ElOceanografo pushed a commit to ElOceanografo/julia that referenced this pull request May 4, 2021
…uliaLang#40163)

* Have different Windows uninstall keys for different Julia versions

Should fix JuliaLang#40004.  Have the uninstall key to be "{#AppNameLong}_is1" where AppNameLong contains the Julia version to prevent Windows from overwriting the uninstall information for different Julia versions.

Inno Setup documentation about the AppId https://jrsoftware.org/ishelp/topic_setup_appid.htm copied here for convenience
```
[Setup]: AppId

Default value:
	
AppName
Description:

The value of AppId is stored inside uninstall log files (unins???.dat), and is checked by subsequent installations to determine whether it may append to a particular existing uninstall log. Setup will only append to an uninstall log if the AppId of the existing uninstall log is the same as the current installation's AppId. For a practical example, say you have two installations -- one entitled My Program and the other entitled My Program 1.1 Update. To get My Program 1.1 Update to append to My Program's uninstall log, you would have to set AppId to the same value in both installations.

AppId also determines the actual name of the Uninstall registry key, to which Inno Setup tacks on "_is1" at the end. (Therefore, if AppId is "MyProgram", the key will be named "MyProgram_is1".) Pre-1.3 versions of Inno Setup based the key name on the value of AppVerName.

AppId is a not used for display anywhere, so feel free to make it as cryptic as you desire. The value may include constants.

If you use a {code:..} constant to allow your user to customize AppId, you do not need to return the real value until just before the installation starts: if necessary you may return an empty or generic value at earlier times. If not empty, this value will only be used to attempt to restore previous install settings (like the settings stored by [Setup] section directive UsePreviousAppDir). If empty, it isn't used for anything.

The length of AppId with all constants evaluated should never exceed 127 characters.
Example:

AppId=MyProgram
```

* Use DirName as AppId

Co-authored-by: Mustafa M <mus-m@outlook.com>

* remove unneeded code

Co-authored-by: Mustafa M <mus-m@outlook.com>
antoine-levitt pushed a commit to antoine-levitt/julia that referenced this pull request May 9, 2021
…uliaLang#40163)

* Have different Windows uninstall keys for different Julia versions

Should fix JuliaLang#40004.  Have the uninstall key to be "{#AppNameLong}_is1" where AppNameLong contains the Julia version to prevent Windows from overwriting the uninstall information for different Julia versions.

Inno Setup documentation about the AppId https://jrsoftware.org/ishelp/topic_setup_appid.htm copied here for convenience
```
[Setup]: AppId

Default value:
	
AppName
Description:

The value of AppId is stored inside uninstall log files (unins???.dat), and is checked by subsequent installations to determine whether it may append to a particular existing uninstall log. Setup will only append to an uninstall log if the AppId of the existing uninstall log is the same as the current installation's AppId. For a practical example, say you have two installations -- one entitled My Program and the other entitled My Program 1.1 Update. To get My Program 1.1 Update to append to My Program's uninstall log, you would have to set AppId to the same value in both installations.

AppId also determines the actual name of the Uninstall registry key, to which Inno Setup tacks on "_is1" at the end. (Therefore, if AppId is "MyProgram", the key will be named "MyProgram_is1".) Pre-1.3 versions of Inno Setup based the key name on the value of AppVerName.

AppId is a not used for display anywhere, so feel free to make it as cryptic as you desire. The value may include constants.

If you use a {code:..} constant to allow your user to customize AppId, you do not need to return the real value until just before the installation starts: if necessary you may return an empty or generic value at earlier times. If not empty, this value will only be used to attempt to restore previous install settings (like the settings stored by [Setup] section directive UsePreviousAppDir). If empty, it isn't used for anything.

The length of AppId with all constants evaluated should never exceed 127 characters.
Example:

AppId=MyProgram
```

* Use DirName as AppId

Co-authored-by: Mustafa M <mus-m@outlook.com>

* remove unneeded code

Co-authored-by: Mustafa M <mus-m@outlook.com>
johanmon pushed a commit to johanmon/julia that referenced this pull request Jul 5, 2021
…uliaLang#40163)

* Have different Windows uninstall keys for different Julia versions

Should fix JuliaLang#40004.  Have the uninstall key to be "{#AppNameLong}_is1" where AppNameLong contains the Julia version to prevent Windows from overwriting the uninstall information for different Julia versions.

Inno Setup documentation about the AppId https://jrsoftware.org/ishelp/topic_setup_appid.htm copied here for convenience
```
[Setup]: AppId

Default value:
	
AppName
Description:

The value of AppId is stored inside uninstall log files (unins???.dat), and is checked by subsequent installations to determine whether it may append to a particular existing uninstall log. Setup will only append to an uninstall log if the AppId of the existing uninstall log is the same as the current installation's AppId. For a practical example, say you have two installations -- one entitled My Program and the other entitled My Program 1.1 Update. To get My Program 1.1 Update to append to My Program's uninstall log, you would have to set AppId to the same value in both installations.

AppId also determines the actual name of the Uninstall registry key, to which Inno Setup tacks on "_is1" at the end. (Therefore, if AppId is "MyProgram", the key will be named "MyProgram_is1".) Pre-1.3 versions of Inno Setup based the key name on the value of AppVerName.

AppId is a not used for display anywhere, so feel free to make it as cryptic as you desire. The value may include constants.

If you use a {code:..} constant to allow your user to customize AppId, you do not need to return the real value until just before the installation starts: if necessary you may return an empty or generic value at earlier times. If not empty, this value will only be used to attempt to restore previous install settings (like the settings stored by [Setup] section directive UsePreviousAppDir). If empty, it isn't used for anything.

The length of AppId with all constants evaluated should never exceed 127 characters.
Example:

AppId=MyProgram
```

* Use DirName as AppId

Co-authored-by: Mustafa M <mus-m@outlook.com>

* remove unneeded code

Co-authored-by: Mustafa M <mus-m@outlook.com>
staticfloat pushed a commit that referenced this pull request Dec 23, 2022
…40163)

* Have different Windows uninstall keys for different Julia versions

Should fix #40004.  Have the uninstall key to be "{#AppNameLong}_is1" where AppNameLong contains the Julia version to prevent Windows from overwriting the uninstall information for different Julia versions.

Inno Setup documentation about the AppId https://jrsoftware.org/ishelp/topic_setup_appid.htm copied here for convenience
```
[Setup]: AppId

Default value:

AppName
Description:

The value of AppId is stored inside uninstall log files (unins???.dat), and is checked by subsequent installations to determine whether it may append to a particular existing uninstall log. Setup will only append to an uninstall log if the AppId of the existing uninstall log is the same as the current installation's AppId. For a practical example, say you have two installations -- one entitled My Program and the other entitled My Program 1.1 Update. To get My Program 1.1 Update to append to My Program's uninstall log, you would have to set AppId to the same value in both installations.

AppId also determines the actual name of the Uninstall registry key, to which Inno Setup tacks on "_is1" at the end. (Therefore, if AppId is "MyProgram", the key will be named "MyProgram_is1".) Pre-1.3 versions of Inno Setup based the key name on the value of AppVerName.

AppId is a not used for display anywhere, so feel free to make it as cryptic as you desire. The value may include constants.

If you use a {code:..} constant to allow your user to customize AppId, you do not need to return the real value until just before the installation starts: if necessary you may return an empty or generic value at earlier times. If not empty, this value will only be used to attempt to restore previous install settings (like the settings stored by [Setup] section directive UsePreviousAppDir). If empty, it isn't used for anything.

The length of AppId with all constants evaluated should never exceed 127 characters.
Example:

AppId=MyProgram
```

* Use DirName as AppId

Co-authored-by: Mustafa M <mus-m@outlook.com>

* remove unneeded code

Co-authored-by: Mustafa M <mus-m@outlook.com>
(cherry picked from commit e2f5f26)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants