kaikramer / keystore-explorer

KeyStore Explorer is a free GUI replacement for the Java command-line utilities keytool and jarsigner.
https://keystore-explorer.org/
GNU General Public License v3.0
1.7k stars 275 forks source link

Windows Installer #128

Closed derhoeppi closed 6 years ago

derhoeppi commented 6 years ago

Short description

The Installer will run as current user.

Steps to reproduce

  1. Install the application with the setup.exe

Expected result

If i use the setup.exe with a software deployment tool then the tool act as system or maybe a service account to install / uninstall software. Therefore i need the installer to run in a all users mode to create startmenue / desktop items.

Actual result

The startmenue shortcuts will only created in the user context

Environment

The solution is to set the SetShellVarContext to all in the nsis script. The default value is current. This setting controls the variable $SMPROGRAMS. It' noticed in chapter 4.3.2 "constants" and 4.9.7.6 of the nsis scripting reference.

kaikramer commented 6 years ago

Sorry for taking so long, I had already written an answer last week, but must have forgotten to actually click the comment button...

Doesn't it depend on the situation if you want to install KSE for all users or only for the current one? Let's say I share a laptop with my wife and install KSE on this machine. My wife certainly does not want KSE to suddenly show up in her start menu.

So, it has to be presented by the installer as a choice to the user: "Do you want to install KSE only for you or for all users?"

The default choice should be "install only for current user" - for compatibility reasons. This would again be a problem for your deployment tool, right?

derhoeppi commented 6 years ago

The software deployment tool acts as system account, so i want to deploy all installations for all users. Is it possible to create a parameter that i can choose for deployment (all user / current user) ?

kaikramer commented 6 years ago

I think that should be possible. I'll see what I can do.

kaikramer commented 6 years ago

Okay, I have added this feature, but I would appreciate if you could help me test it.

derhoeppi commented 6 years ago

Yes i could test it. Is there a compiled version or should i compile my own version for testing?

kaikramer commented 6 years ago

Here is a build (it's zipped because I cannot upload .exe here):

--removed--

The new command line parameter is: /AllUsers

derhoeppi commented 6 years ago

I've tested the installer. As per user installation the installer and uninstaller works as aspected. When i tried the same with the parameter /AllUsers then the installer works great but the uninstaller leave the StartMenue items instead of removing them.

kaikramer commented 6 years ago

This should be fixed now (at least it is on my Win10 machine). The start menu link to the uninstaller and the UninstallString registry key are now both created with the same parameter that was used for installation (/AllUsers or /CurrentUser).

kse-540-setup.zip

derhoeppi commented 6 years ago

I tested again with the fixed setup. Now it works as expected. The installation and uninstallation works great. Thank you.