0

I want to create an installer that: - install a software package - copy a host file in the user system without any user installation except launching the installer.

I need this installer to run as admin but I do not want to disclose the admin login/password to users but instead I want to embed it in the installer itself. How can I insert the admin credentials within the installers, please ? Is it even possible ?

I've looked into the forums but did not find what I'm trying to do.
Thank you for your help and support, Fred

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
  • If you are asking if you can create an Inno Setup installer that can install as administrator from a non-administrator account without prompting for credentials, the answer is "no." (That would be a huge security hole!) – Bill_Stewart Apr 07 '20 at 21:07

1 Answers1

1

You basically need this:
Make Inno Setup installer request privileges elevation only when needed
(the old code in the second part of my answer with an explicit code for the elevation for Inno Setup 5)

Except that instead of simply re-running the installer with runas verb (which needs entering the Administrator credentials manually), you need this:
Inno Setup run/execute code as another user

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992