Click here to Skip to main content
14,298,693 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi everyone,

I have a Vb.Net Application and i have created a setup using 'Setup and Deployment' with Dot.Net Framework(4.5.2) prerequisites. It takes admin privileges to install every time.

Now I wants to install it without admin privileges and it should be install in Non-admin user account without any prompt as my client wants.

Please help.. what i can do..

What I have tried:

I have changed target folder from 'Program files' to 'Program Data'. but still it asking for admin password.
Posted
Updated 3-Sep-19 20:30pm
v2
Rate this:
Please Sign up or sign in to vote.

Solution 1

Installation nearly always requires admin privileges: it doesn't just add your EXE, it needs to make changes to the operating system like saving and registering DLL's as system files, making changes to the Windows Registry or updating Windows core files.
To do any of that - and it doesn't know if it does need to until it tries - it gets admin first.
Users are used to it, and it shouldn't be subverted even if it could.

And storing your app in a Data folder instead of Program Files is a bad idea: Program files are deliberately more secure so that virus activity can be more easily limited - storing your app in a data folder bypasses that extra security and make your users more vulnerable.
   
Comments
KHEMRAJ_UDR 3-Sep-19 10:40am
   
thanks you very much for your guidance..
but i am able to install some other applications without any prompt in non-admin account like chrome and LibreOffice. so i want do same..
Rate this:
Please Sign up or sign in to vote.

Solution 2

Quote:
Now I wants to install it without admin privileges and it should be install in Non-admin user account without any prompt as my client wants.
It feels like you do not want to give them admin rights, but still wish to have Visual Studio IDE installed. What you can do is, perform the installation with your admin credentials one time, and then let them use the software as a non-admin user with the stuff that you have installed for them.

In my previous job, I remember, they had this requirement set. No employee was granted admin rights, and every time you needed an installation/upgrade, you had to visit the IT team and they would perform it for you.

I am really sorry, but in these conditions there is little that we can do for you.
Quote:
still it asking for admin password.
That is because Visual Studio IDE knows that you are trying to trick something and requires admin rights. Not because it has to, but because there are several dependencies that require to be installed in directories that require admin rights, and it has to configure registry, etc. that further require admin rights. Thus, it always asks for admin rights.

I tried using that "Install location" feature, and it turns out, some components are still installed at specific locations and you cannot change that.
   
v2
Comments
KHEMRAJ_UDR 3-Sep-19 10:40am
   
thanks you very much for your guidance..
but i am able to install some other applications without any prompt in non-admin account like chrome and LibreOffice. so i want do same..
Afzaal Ahmad Zeeshan 3-Sep-19 12:58pm
   
It only means that those software do not require admin rights, it does not mean that a guest can perform admin actions as a guest.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100