1

I'm trying to create an application that does not require admin rights to use.

When I publish the application there are 3 components shown:

  1. A folder called "Application Files"
  2. setup.exe
  3. MyApplicationName.application

Running MyApplicationName.application executes my application as intended, adds an icon to the desktop and notifies the user when an update has been pushed out. :)

My users by default try to click on setup.exe and this requires them to get admin rights to install the application.

I can see two solutions and I'll accept either.

  1. How do I get rid of the setup.exe file from being created on publish.
  2. How do I get the setup.exe file not to require installation of the .NET framework or anything else that will need admin rights/privileges.
KJSR
  • 1,679
  • 6
  • 28
  • 51
Mandelbrotter
  • 2,216
  • 2
  • 11
  • 28
  • Did you try just deleting the "setup.exe" file after deployment? I don't think it is required. – beeker Oct 29 '19 at 16:26
  • I'll be deploying my solution to many different locations. I can write a powershell script to go to each location and delete it but there has to be a better way than being reactive. – Mandelbrotter Oct 29 '19 at 16:27
  • 1
    If your app runs on .Net 4.7.2, your clients need to have that installed - there is no way around it. You can migrate to .Net Core where you can have self-contained deployments without needing to pull the framework. – trailmax Oct 29 '19 at 16:41
  • @trailmax what do you make of the fact that they can run it without installing anything if they use the other file. Is there a dependency I have included that I can remove to allow the setup.exe file to run without admin privileges? Also thank you for letting me know about self-contained deployments. I'll be looking into it when time permits. – Mandelbrotter Oct 29 '19 at 17:05
  • If they can execute `myApp.exe` without installing the framework, then they already have the framework installed. That means your `setup.exe` does not check for the framework, just bluntly demands it to be installed. – trailmax Oct 30 '19 at 10:20
  • Yes that is correct. How to I bluntly tell it not to install it. Note: Setup.exe also asks me to install it when I'm the one building the app and I know I have it installed. – Mandelbrotter Oct 30 '19 at 13:38

1 Answers1

0

To get rid of Setup.exe I had to unload my project in Visual Studio and edit the .csproj file.

The changes I've made are listed bellow.

Set BootstrapperEnabled to false

<BootstrapperEnabled>false</BootstrapperEnabled>

Deleted the section bellow

<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
  <Visible>False</Visible>
  <ProductName>Microsoft .NET Framework 4.7.2 %28x86 and x64%29</ProductName>
  <Install>true</Install>
</BootstrapperPackage>
Mandelbrotter
  • 2,216
  • 2
  • 11
  • 28