camposomar
Posts: 11
Joined: Sun Feb 06, 2011 4:12 am

unistaller with password

hello All,


exist some way for make a unistaller with password... for expample, if someone like unistall software , need put a password for continue desistalation.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: unistaller with password

Hello,

Actually, the recommended approach in this case would be to use the Installation Type option from the Install Parameters Page.
You should have restrictions on your package based on the logged user. For example the user that installs or uninstalls the package should be administrator( logged with his credentials ).

Another recommended approach would be to use our Serial Validation feature which is much more secure than a simple password.

Although it is not recommended on uninstall, if you still want to use a password you can follow these steps:
  • create an Enterprise project
  • go to Dialogs page, on the "MaintenanceWelcomeDlg"
  • here add a new edit box were the user can enter the password
  • set the property of the editbox to "MY_PASS"
  • now select the "Next" button from same dialog and add a new published event, from the "Published Events" tab, lower side of the page
  • set the event like this:
    Name: SpawnDialog
    Argument: <NewDialog>
    Condition: MY_PASS <> "here you write the password" AND REMOVE="ALL"
This will make the installer pass to the next dialog on uninstall only if the correct password is entered.

Best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vigyanlabsmys
Posts: 73
Joined: Sat May 17, 2014 12:37 pm

Re: unistaller with password

Hi,

Although it is not recommended on uninstall, if you still want to use a password you can follow these steps:

create an Enterprise project
go to Dialogs page, on the "MaintenanceWelcomeDlg"
here add a new edit box were the user can enter the password
set the property of the editbox to "MY_PASS"
now select the "Next" button from same dialog and add a new published event, from the "Published Events" tab, lower side of the page
set the event like this:
Name: SpawnDialog
Argument: <NewDialog>
Condition: MY_PASS <> "here you write the password" AND REMOVE="ALL"

This will make the installer pass to the next dialog on uninstall only if the correct password is entered.

We are using 11.6 advanced installer. I tried the above scenario you have given. But the password is not getting prompted why?. Attached the file .aip file PFA
Attachments
uninstall.aip
(18.04 KiB) Downloaded 1183 times
Best Regards,
Dan
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: unistaller with password

Hello,

This may happen if you uninstall the setup from Control Panel. When you do like that the uninstall will be performed with basic UI and no dialogs will be displayed. The maintenance dialogs will be displayed only when you launch the uninstall by running the setup package.

If you want to always require a password during uninstall, then you will have to develop your own custom action which will implement the hole functionality and return an exit code different than 0 (zero) when the password is incorrect. The custom action should be added after "Install Execution Stage -> Searches" action group.

If you have any questions let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vigyanlabsmys
Posts: 73
Joined: Sat May 17, 2014 12:37 pm

Re: unistaller with password

Hi,

Thanks for the reply. Can u send one example, in that if user clicks uninstall in control panel, a dialog box should appear, in that ask user to enter password, if user enters correct password then uninstall should happen.
Best Regards,
Dan
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: unistaller with password

Hello,

Here you can find attached a sample which include a simple VBS custom action which prompt for user password during a regular uninstall.
sample.zip
(2.88 KiB) Downloaded 715 times
Here is the VBS custom action content:

Code: Select all

Function MyPasswordCA()

   password = InputBox("Please enter a your password:", _
"Enter password")

   If password = "my_pass_value" Then
   	'return success
  	MyPasswordCA = 0
	Exit Function	
   Else
	'return error
  	MyPasswordCA = 3
	Exit Function
   End If

End Function
Please note that you can develop your custom action with the desired functionality in any programming language you want. For example you can write a C# custom action.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vigyanlabsmys
Posts: 73
Joined: Sat May 17, 2014 12:37 pm

Re: unistaller with password

Thank you!...
Best Regards,
Dan
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: unistaller with password

You're always welcome.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vigyanlabsmys
Posts: 73
Joined: Sat May 17, 2014 12:37 pm

Re: unistaller with password

Hi ,

The script you have given works fine, but password is visible to user, so how to mask password?
Best Regards,
Dan
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: unistaller with password

Hello,

You can try to use an approach like in the "How Can I Mask Passwords Using an InputBox?" article.

Also, you can try to develop your custom action into another programming language.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
the_akshat
Posts: 8
Joined: Fri Nov 13, 2015 10:54 am

Re: unistaller with password

How to compare the password against a password stored as a SHA-256 hash in a file?
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: unistaller with password

Hello,

I'm afraid I'm not familiar with the procedure of the password SHA-256 hashing. You can try to compute the hash of the plain password and then compare the computed hash with the existing one in your file. However, the entire functionality should be written into your own custom action.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
the_akshat
Posts: 8
Joined: Fri Nov 13, 2015 10:54 am

Re: unistaller with password

vigyanlabsmys wrote: Although it is not recommended on uninstall, if you still want to use a password you can follow these steps:
Why is that so?
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: unistaller with password

Hello,

I think what my colleague tried to say is that is unusual rather than not recommended. From our point of view it is not a common request to ask for passwords on uninstall.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”