problem: USES inno setup to package our published program test.exe. After the installation, check Launch XXX to run the program, and the following error occurs:
Unable to execute file:xxx
CreateProcess failed; code 740.
The requested operation needs to be promoted.
error reason: below are the two ICONS of test.exe, with the shield is with the administrator rights, without the shield is a normal program.
When packaging ordinary programs, the end of the installation will not report an error; An error will not be reported until the end of the installation when the administrator privilege program is packaged.
My guess is that when the installation package is executed, the installation package does not carry administrator rights, so after the installation is over, start test.exe without administrator rights and it will execute normally.
However, if you were to execute test.exe with administrator privileges, you would have permission issues.
therefore, we need to install the package with administrator rights, let the installation package run with administrator rights.
Specific implementation steps are as follows:
Let the installation packages generated by inno Setup come with administrator privileges
Download Resource Hacker
Download address: http://www.angusj.com/resourcehacker/
2. Modify setupldr.e32 file
, right click on the administrator rights to run resourcehacker.exe, select File-> Open, find the setupldr.e32 file in the Inno Setup installation directory.
I’ll change asInvoker to requireAdministrator
After modification, first select Action-& GT; Modify, then File-> Save. As follows:
3. Recompile the package script
Recompiled with Inno Setup, the resulting installation package will have a shield attached to the icon. As follows:
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Spare time not regularly update some ideas, thinking articles, welcome to pay attention to, discuss together, precipitation technology!
Read More:
- When nodejs is installed: the error code is 2503
- gradle sync failed CreateProcess error=267 directory is invalid
- The file is generated, but an error is still reported. Error: CreateProcess failed
- Configuration (9) to solve the problem of “setup tools PIP wheel failed with error code 1”, create virtual environments with Python of anaconda
- An error is reported when installing the package directly in pycharm, but it can be installed through the terminal. Error non zero exit code (2)
- Mac install pycurl error: python setup.py egg_info" failed with error code 1”
- Unable to install SQL Server (setup.exe), VS Shell installation has failed with exit code 1638.
- Command “python setup.py egg_info” failed with error code 1 in /private/var/folders/14/4hz051qx0wqd3
- Error: pngquant failed to build, make sure that libpng-dev is installed
- CreateProcess error=193, %1 is not a valid Win32 application
- ERROR: Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-install-zsbbp6ce/mysq
- CreateProcess error 206 The filename or extension is too lo
- How to Fix nbconvert failed: Pandoc wasn’t found. Please check that pandoc is installed:
- After matlab2018a is successfully installed, a licensing error appears when it is opened: – 8523
- Failed to access perfctr MSR appears when CentOS is installed
- After Android studio is installed, open a pop-up window to prompt failed to load JVM DLL XXX
- Caused by: java.io.IOException: CreateProcess error=87, The parameter is incorrect
- After openstack neutron is installed, the Linux bridge starts and the error is resolved
- When idea executes the command, an error is reported: CreateProcess error = 2. The system cannot find the specified file
- Code blocks debugger debugger setup problem