Author Topic: A problem while unistall nasm  (Read 53207 times)

Offline the_mart

  • Jr. Member
  • *
  • Posts: 14
  • Country: gb
Re: A problem while unistall nasm
« Reply #15 on: July 06, 2011, 09:47:45 PM »
1) A regular user can install the nasm but at uninstall the start menu entries left untouched, right?
In result the second attempt to remove files with admin rights leads to problems because registry
entries already cleaned up.

It’s not really a case of regular user versus admin user, as the install and uninstall is being done by a user account which has admin privileges. As this is Windows Vista / Windows 7, just double clicking the uninstaller runs it without privilege escalation, so it removes only the registry entry (because HKCU is writable without privilege escalation) and does not delete the NASM files or menu entry (because those folders are not writable without privilege escalation). If you choose the “run as administrator” option then the uninstaller can remove the registry entry, the NASM files, and the menu entry.

2) An admin user can operate with nasm uninstaller without problems, correct? Ie if admin installed it
he can uninstall it safely, right?

If they remember to choose the “run as administrator” option when uninstalling, they will be ok. If they forget to do this when uninstalling, they run into the above problem.

If you run the installer without privilege escalation, it installs in the user’s profile directory and there is no issue uninstalling it.

Is there something I can help with? I’ve only created Windows Installers before, but I can take a look at the installer if the learning curve is not too steep.

Offline the_mart

  • Jr. Member
  • *
  • Posts: 14
  • Country: gb
Re: A problem while unistall nasm
« Reply #16 on: July 06, 2011, 09:50:16 PM »
Btw, can the registry key go under HKLM rather than HKCU when doing an “install for all users”? It would certainly avoid the problem of the uninstaller removing the registry entry whilst leaving everything else in place.

Offline Rob Neff

  • Forum Moderator
  • Full Member
  • *****
  • Posts: 429
  • Country: us
Re: A problem while unistall nasm
« Reply #17 on: July 06, 2011, 11:03:03 PM »
I ran into the issues mentioned when writing commercial apps for Vista a few years ago.  HKLM is a protected resource and would require the installer to have elevated administrative privileges.  One area I believe that the installer may need enhancement is to include a program manifest and possibly code signing which would eliminate the right-click Run-As Admin issue...

Offline Cyrill Gorcunov

  • NASM Developer
  • Full Member
  • *****
  • Posts: 179
  • Country: 00
Re: A problem while unistall nasm
« Reply #18 on: July 07, 2011, 06:16:36 AM »
So, Rob, could you please take a look into nasm.nsi to fix all this out? I don't have windows machine permanent access for testing :(

Offline Cyrill Gorcunov

  • NASM Developer
  • Full Member
  • *****
  • Posts: 179
  • Country: 00
Re: A problem while unistall nasm
« Reply #19 on: July 07, 2011, 06:21:02 AM »
1) A regular user can install the nasm but at uninstall the start menu entries left untouched, right?
In result the second attempt to remove files with admin rights leads to problems because registry
entries already cleaned up.

It’s not really a case of regular user versus admin user, as the install and uninstall is being done by a user account which has admin privileges. As this is Windows Vista / Windows 7, just double clicking the uninstaller runs it without privilege escalation, so it removes only the registry entry (because HKCU is writable without privilege escalation) and does not delete the NASM files or menu entry (because those folders are not writable without privilege escalation). If you choose the “run as administrator” option then the uninstaller can remove the registry entry, the NASM files, and the menu entry.

The former idea wast to allow installation for a regular user as well, without priviledge escalation. Ie kinda "install for me only" and as far as i remember such scenario should work on windows.

2) An admin user can operate with nasm uninstaller without problems, correct? Ie if admin installed it
he can uninstall it safely, right?

If they remember to choose the “run as administrator” option when uninstalling, they will be ok. If they forget to do this when uninstalling, they run into the above problem.

If you run the installer without privilege escalation, it installs in the user’s profile directory and there is no issue uninstalling it.

Is there something I can help with? I’ve only created Windows Installers before, but I can take a look at the installer if the learning curve is not too steep.

If you can look into nasm.nsi script (which is the nsis installer script) this would be just great!

Offline the_mart

  • Jr. Member
  • *
  • Posts: 14
  • Country: gb
Re: A problem while unistall nasm
« Reply #20 on: July 07, 2011, 07:11:34 AM »
The former idea wast to allow installation for a regular user as well, without priviledge escalation. Ie kinda "install for me only" and as far as i remember such scenario should work on windows.

Indeed. With Windows installer you double click the installer, and then it gives you the choice of installing for all users, or just the current user (if the installer has this option enabled of course). If you choose the “all users” option, it gives the privilege escalation prompt. I wonder if the installer can do it that way.

If you can look into nasm.nsi script (which is the nsis installer script) this would be just great!

Sure, I’ll see what I can do.

Offline Cyrill Gorcunov

  • NASM Developer
  • Full Member
  • *****
  • Posts: 179
  • Country: 00
Re: A problem while unistall nasm
« Reply #21 on: July 15, 2011, 08:25:26 PM »
Anyway, I'm going to release a fix in nasm-2.09.10, uninstallation procedure will ask a user to confirm files deletion, it's better than silent deletion of files and etc I think.