Announcement

Collapse
No announcement yet.

File run as Admin

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • File run as Admin

    Hello together
    I hope you can help me with a small problem! I have created a small setup with a few commands to execute and unfortunately do not get the desired result! Result = File.Run (SessionVar.Expand ("%AppFolder%\\myProgram\\file\\aa.exe"), "", "", SW_SHOWNORMAL, false); Result = File.Run (SessionVar.Expand ("%AppFolder%\\myProgram\\file\\bb.exe"), "", "", SW_SHOWNORMAL, false); Result = File.Run (SessionVar.Expand ("%AppFolder%\\myProgram\\file\\cc.exe"), "", "", SW_SHOWNORMAL, false); Result = File.Run (SessionVar.Expand ("%AppFolder%\\myProgram\\file\\dd.exe"), "", "", SW_SHOWNORMAL, false); File 1 and 2 is not executed as it should be! I go directly into the folder on the executable file then this is run as it should be! what am I doing wrong? How can I kick this executable file as Admin? Thanks in advance for your assistance




  • #2
    If you manifest the setup to be run as "Require administrator (default)", then the four program executions via File.Run() will be performed with administrative rights.


    Ulrich

    Comment


    • #3
      Originally posted by Ulrich View Post
      If you manifest the setup to be run as "Require administrator (default)", then the four program executions via File.Run() will be performed with administrative rights.


      Ulrich
      But how do you set a file (.exe) to have the "Run As Administrator" set for the program? I suppose i could create a shortcut to have this.

      Comment


      • #4
        If you are the author of that program, then probably you should build it in a way that no admin rights are required. Normal programs should not run needing admin rights, period. This is something that should happen only when changes are made to the system, in other words, occasionally, to update a setting or configuration of the environment - such as installing a new program.

        If you have the need to run a very old program which was not updated since Vista and needs to be run as admin to work properly, you have to set the compatibility mode on the application. There is a post here where I explain this.

        Ulrich

        Comment

        Working...
        X