Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
305 views
in Technique[技术] by (71.8m points)

How to create ONE-FILE setup package in Visual studio (C#) to be run WITHOUT elevated privileges

Iam strugling with creating ONE-FILE setup for my Windows WPF project, that will run WITHOUT elevated privileges.

The target is to create single executable that can be downloaded from web and simply installed, even for standard Windows user.

The instalation goes to {user}appdatalocal, so it does not need elevated privileges to install. It should work similarly to Chrome installation. It should not ask user to unzip to temporary directory and to run setup from there again.

What I have already tried:

  1. I have downloaded VS extension VS Installer Projects and created project. It works fine, it creates setup.exe and corresponding MSI file. Using msiinfo.exe -w 10 I can set the MSI to be installed without elevated privileges. Everything works OK,the only problem is that it creates TWO files.

  2. Then I downloaded MSI2EXE convertor https://www.imelfin.com/convert-msi-to-exe.html It works fine, the result is SETUP.EXE, that contains MSI internally. But it REQUIRES elevated privileges to run.

I have not found a way how to create ONE-FILE setup executable that can be installed WITHOUT elevated privileges.

Thanks for help.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...