Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Files and folders not deleted on Manual Uninstall of a Pushed MSI


5 replies to this topic

rpremkumar

rpremkumar
  • Full Members
  • 3 posts

Posted 29 February 2016 - 05:40

Hello All,

i have a Basic MSI built using Installshield-12. the MSI installer Supports push installation from Windows Server 2012 R2.

What I am Doing : 
1. Installing the MSI to Windows-7 client PC through Push installation.
2. Manually Uninstalling the application from "Add or Remove Programs" in Control panel.

Problem Faced : 
Some files and folders are not deleted from installation directory after Uninstallation completes.

Observations : 
-- Uninstallation is not Launched with elevated privileges when launched from Control panel.

-- when the UAC is turned OFF, files and folders are deleted with manual uninstallation.

-- with UAC kept ON and if i launch uninstall with elevated privileges from command prompt, the files and folders are deleted.


Can anyone suggest how i can elevate the Uninstall every time it is launched from control panel?

that is, Is there a registry that can be set to make the uninstall from control panel elevated? or is there any other way i can make the MSI to launch uninstall with elevated privileges every time or any other possible solution for my problem.

Any help is greatly appreciated.

Best Regards
Prem Kumar R


Edited by rpremkumar, 29 February 2016 - 06:39.


deramor

deramor
  • Full Members
  • 187 posts

Posted 29 February 2016 - 17:43

There is a setting in the release view to tell the installer what UAC level to request.  I think the default is Invoker.  Change it to Administrator and it will elevate when you uninstall.



rpremkumar

rpremkumar
  • Full Members
  • 3 posts

Posted 01 March 2016 - 10:58

Hello Deramor,

 

Thank you for the reply.

 

i checked the setting associated with UAC level  in the release view. it is set to "Administrator" only. i think this setting is working correctly because the uninstall is elevated when i do normal installation and uninstall it from control panel. 

 

i am facing the elevation problem only when Installation is done through group policy push installation and uninstall is done manually from control panel. 

any idea why this might be happening.

 

Regards

Prem Kumar R


Edited by rpremkumar, 01 March 2016 - 11:00.


deramor

deramor
  • Full Members
  • 187 posts

Posted 02 March 2016 - 01:42

The first thing I would try is getting a log when uninstalling with both methods and looking for differences.

 

Maybe there is something obvious that will point you in the right direction.



rpremkumar

rpremkumar
  • Full Members
  • 3 posts

Posted 30 March 2016 - 13:59

Hello Deramor,

 

Sorry for the late reply. got caught up in some other work.

 

i tried comparing the log files. my observations are as follows.

1. The files installed by Installer are deleted.

2. Only files that are not logged for deletion is not deleted.

 

i had written code to delete these files explicitly from code using "DeleteFile()" installscript function. and the log shows that the installer does not have enough rights to delete the file.

 

i understood that the installer is not having enough privileges when installed through push installation and uninstalled manually. i am planning to add the code to delete these files in a differed custom action so that the installer gets enough privileges. i will try this approach and update the thread.

 

kindly let me know if this issue can be solved by any other better approach.

 

Regards

Prem Kumar R



deramor

deramor
  • Full Members
  • 187 posts

Posted 30 March 2016 - 16:46

Simply putting the delete commands in a deffered action won't provide the access rights to perform the action.  The calling process must provide an admin access token or the installer will need to prompt to elevate.  Since I think you are uninstalling silently, the only course of action would be to make sure whatever initiates the uninstall process is launched with admin rights.