When I run TWebUpdate to update my exe in the C:\Program File (x86), everything runs perfectly well. However, the new exe runs in the security context of the Administrator, not the Standard User.
Is it possible to force the newly loaded exe to run as Standard User?
Steps :
1. Log onto PC as Standard User
2. Run Project1.exe which is loaded in C:\Program Files (x86)
3. Project1.exe finds a new version and starts updating
4. When prompted, enter Administrator credentials
5. Project1.exe terminate and reloads
6. Reloaded Project1.exe now runs
The reloaded Project1.exe is running under Admin credentials. I need it running under Standard credentials.
Admin privileges are required to be able to update files under c:\program files (x86)\ as this is a protected folder in Windows. So, the TWebUpdate will always try to elevate to admin privileges. If your application is not installed under c:\program files (x86), you can use TWebUpdate without this UAC. To do this, remove the line
The internal updater ie wusetup.exe / wurepl.exe, reloads the new version of the exe using Admin credentials.
Is
it not possible, that after the exe has been overwrote with the newer
version, it loads the exe as Current Logged On User credentials, ie the
credentials (token) used when the whole process was started.
Checking the source code in upd.dpr ("UPD project for TWebUpdate") I see it uses WinExec. Could it be possible to use CreateProcess with Current Logged On User token etc
That means in this case you are not using the registered version but a trial version. The registered version download is found after login on our website under "Account" / "My Products".