I'm trying to run another installer at the end of the installation ( postinstall
). The installer needs administrator provileges. So PrivilegesRequired=admin
was added and the error still was there.
Unable to execute file:
C:\\Users\\User1\\AppData\\Local\\Multi Webcam Video Recorder\\webcam.exeCreateProcess failed; code 740.
The requested operation requires elevation.
#define MyAppName "Multi Webcam Video Recorder"
#define MyAppExeName "webcam.exe"
[Setup]
AppName={#MyAppName}
PrivilegesRequired=admin
[Files]
Source: ..\src\webcam.exe; DestDir: {localappdata}\{#MyAppName}; Flags: ignoreversion
[Run]
Filename: {localappdata}\{#MyAppName}\{#MyAppExeName}; Description: {cm:LaunchProgram,{#MyAppName}}; Flags: nowait postinstall skipifsilent
With postinstall
flag , the program is by default executed with original permissions, even if the installer itself is running with Administrator permissions. To keep the (Administrator) permissions of the installer, add runascurrentuser
flag :
[Run]
Filename: {localappdata}\{#MyAppName}\{#MyAppExeName}; \
Description: {cm:LaunchProgram,{#MyAppName}}; \
Flags: nowait postinstall skipifsilent runascurrentuser
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.