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

Offline codeferever

  • Jr. Member
  • *
  • Posts: 21
A problem while unistall nasm
« on: March 06, 2011, 03:49:07 AM »
Hello,everybody
As I had just installed office 2010 in my XP, and at the same time unistalled the nasm.
But the nasm-unistall-tool had deleted the files in office directory, why ?  ???

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: A problem while unistall nasm
« Reply #1 on: March 09, 2011, 10:17:38 PM »
Hi Codeferever,

Don't uninstall Nasm! Why would anyone want to uninstall Nasm? :)

Seriously, I have no idea why that happened. You didn't install the Office(r) files under the nasm directory, did you? Could be a bug in the uninstaller, but it seems improbable that it would search out and uninstall Office(r) files. If it's a bug, it's pretty serious, uninstalling stuff it's not supposed to! I'm not in a position to test it (my religion prohibits MS software). If it should happen again, see if you can spot a pattern to what it's doing - just Office(r)? Anything you install after Nasm? Just the first thing installed after Nasm? Or what? I suspect - I hope - that it's a one-time glitch... possibly "pilot error". I suppose if it turns out to be a bug, the easiest thing would be to remove the uninstaller from the package(?). You shouldn't need an "uninstaller" to delete a couple of files!

Sorry you had a problem with it.

Best,
Frank


Offline David Stone

  • Jr. Member
  • *
  • Posts: 4
Re: A problem while unistall nasm
« Reply #2 on: March 26, 2011, 06:39:44 AM »
I also had a problem like this. thanks admin for solving it.

Offline the_mart

  • Jr. Member
  • *
  • Posts: 14
  • Country: gb
Re: A problem while unistall nasm
« Reply #3 on: July 05, 2011, 08:21:32 AM »
What was the solution to this? Was it a bug in the uninstaller? I don’t know if it’s the same issue, but I’ve found that the NASM uninstaller sometimes tries to delete all of the files in my root C directory, including the boot manager! Fortunately it doesn’t succeed in deleting the boot manager, but it did delete the boot sector backup (not really an issue, but worrying nonetheless).

Attached is a screenshot where I have tested this on a Windows Vista x86 machine. The “mart.txt” file is just an empty text file I put there, to check whether it is deleting all files indiscriminately.

Offline Cyrill Gorcunov

  • NASM Developer
  • Full Member
  • *****
  • Posts: 179
  • Country: 00
Re: A problem while unistall nasm
« Reply #4 on: July 05, 2011, 09:39:47 AM »
What was the solution to this? Was it a bug in the uninstaller? I don’t know if it’s the same issue, but I’ve found that the NASM uninstaller sometimes tries to delete all of the files in my root C directory, including the boot manager! Fortunately it doesn’t succeed in deleting the boot manager, but it did delete the boot sector backup (not really an issue, but worrying nonetheless).

Attached is a screenshot where I have tested this on a Windows Vista x86 machine. The “mart.txt” file is just an empty text file I put there, to check whether it is deleting all files indiscriminately.

Crap, i'll take a look.

Offline Cyrill Gorcunov

  • NASM Developer
  • Full Member
  • *****
  • Posts: 179
  • Country: 00
Re: A problem while unistall nasm
« Reply #5 on: July 05, 2011, 09:50:16 AM »
It seems the following snippets from installer script are failed

Code: [Select]
    ;
    ; Start Menu folder
    ReadRegStr $0 HKCU Software\${PRODUCT_SHORT_NAME} "lnk"
    Delete /rebootok "$0\*"
    RMDir "$0"
    DeleteRegKey /ifempty HKCU "Software\${PRODUCT_SHORT_NAME}"

Could you please check what you have in Current User\Software\nasm hive of Registry?
(I'm not sure if I wrote the hive path correct -- don't have access to win machine for a while).

Offline the_mart

  • Jr. Member
  • *
  • Posts: 14
  • Country: gb
Re: A problem while unistall nasm
« Reply #6 on: July 05, 2011, 10:57:17 AM »
I currently have this in the registry key:

Code: [Select]
[HKEY_CURRENT_USER\Software\nasm]
@="C:\\Program Files\\nasm"
"lnk"="C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Netwide Assembler 2.09.09"
"nasm"="Netwide Assembler 2.09.09"

I’ve just tested on my Vista x86 VM, and I think I see what has happened. The uninstaller doesn’t require privilege escalation, so if you run it without escalation it deletes the NASM registry key, but is unable to remove any of the files. If you then run the uninstaller as an admin, it looks like the absence of the registry key is causing files from the root of the drive to be deleted.

So, steps to reproduce:

  • Run uninstaller in Vista or Windows 7 by double clicking it.
  • Run uninstaller again by right clicking and choosing “Run as administrator”.

I have verified this by running the installer as an admin, deleting the NASM registry key with regedit, and then running the uninstaller as an admin.

Offline Cyrill Gorcunov

  • NASM Developer
  • Full Member
  • *****
  • Posts: 179
  • Country: 00
Re: A problem while unistall nasm
« Reply #7 on: July 05, 2011, 05:20:29 PM »
Quote
I currently have this in the registry key:

Code: [Select]
[HKEY_CURRENT_USER\Software\nasm]
@="C:\\Program Files\\nasm"
"lnk"="C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Netwide Assembler 2.09.09"
"nasm"="Netwide Assembler 2.09.09"

I’ve just tested on my Vista x86 VM, and I think I see what has happened. The uninstaller doesn’t require privilege escalation, so if you run it without escalation it deletes the NASM registry key, but is unable to remove any of the files. If you then run the uninstaller as an admin, it looks like the absence of the registry key is causing files from the root of the drive to be deleted.

Hmm, indeed, it seems to be related to the priviliedges obtained at uninstallation procedure. But if you've installed nasm as a regular user uninstaller still can't delete files?

Quote
So, steps to reproduce:

  • Run uninstaller in Vista or Windows 7 by double clicking it.
  • Run uninstaller again by right clicking and choosing “Run as administrator”.

I have verified this by running the installer as an admin, deleting the NASM registry key with regedit, and then running the uninstaller as an admin.

Offline the_mart

  • Jr. Member
  • *
  • Posts: 14
  • Country: gb
Re: A problem while unistall nasm
« Reply #8 on: July 05, 2011, 05:30:38 PM »
But if you've installed nasm as a regular user uninstaller still can't delete files?

I ran the installer with admin privileges, otherwise it doesn’t even give the option to install for all users.

Offline Cyrill Gorcunov

  • NASM Developer
  • Full Member
  • *****
  • Posts: 179
  • Country: 00
Re: A problem while unistall nasm
« Reply #9 on: July 05, 2011, 05:40:21 PM »
crap, I'll try to grab windows machine to test all things out. Previously (at time the script was developed) there was no such problem, but it was winxp machine and i'm far from being win expert, so any help quite appreciated.

Offline Cyrill Gorcunov

  • NASM Developer
  • Full Member
  • *****
  • Posts: 179
  • Country: 00
Re: A problem while unistall nasm
« Reply #10 on: July 05, 2011, 07:29:55 PM »
Could you please try the installer from here, in case if registry keys are empty it should stop uninstalling.

http://ge.tt/9nrjxh5/v

Offline Cyrill Gorcunov

  • NASM Developer
  • Full Member
  • *****
  • Posts: 179
  • Country: 00
Re: A problem while unistall nasm
« Reply #11 on: July 05, 2011, 07:32:59 PM »
Still I have no idea why files being installed as regular user can't be removed by the  same user after :/

Offline the_mart

  • Jr. Member
  • *
  • Posts: 14
  • Country: gb
Re: A problem while unistall nasm
« Reply #12 on: July 05, 2011, 08:06:33 PM »
Could you please try the installer from here, in case if registry keys are empty it should stop uninstalling.

http://ge.tt/9nrjxh5/v

I tried this, and it did indeed abort the uninstall. The NASM files were removed, but the menu entries were left. It’s much better than before though.

The files can be removed by the same user afterwards, but you have to use privilege escalation. Without that, it happily removes the HKCU registry keys but fails on removing the files.

Offline Cyrill Gorcunov

  • NASM Developer
  • Full Member
  • *****
  • Posts: 179
  • Country: 00
Re: A problem while unistall nasm
« Reply #13 on: July 05, 2011, 08:34:45 PM »
Sigh, i don't understand windows, completely. Lets summarize what we have now.

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.

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

Offline Cyrill Gorcunov

  • NASM Developer
  • Full Member
  • *****
  • Posts: 179
  • Country: 00
Re: A problem while unistall nasm
« Reply #14 on: July 06, 2011, 09:03:08 PM »
So the_mart is there a way you to help resolve this issue by testing various scenarios I mentioned before?
I really with this problem was reported to bug tracker directly pretty ago :(