How to get output after ExecAsOriginalUser

47 views
Skip to first unread message

Pityulin Alexandr

unread,
Aug 29, 2025, 12:33:53 PM (9 days ago) Aug 29
to innosetup
I can get the output using ExecAndCaptureOutput method, but I need to execute the application with user rights. How can I get the output using ExecAsOriginalUser, or lower the rights before calling ExecAndCaptureOutput?

Martijn Laan

unread,
Aug 29, 2025, 4:13:29 PM (9 days ago) Aug 29
to innosetup
Sorry but such a function is not available. 

Greetings,
Martijn 


Op vr 29 aug , Pityulin Alexandr <pity...@gmail.com> schreef:
I can get the output using ExecAndCaptureOutput method, but I need to execute the application with user rights. How can I get the output using ExecAsOriginalUser, or lower the rights before calling ExecAndCaptureOutput?

--
You received this message because you are subscribed to the Google Groups "innosetup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to innosetup+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/innosetup/71fa0ba4-91a4-40a4-9e6b-96872eae97d2n%40googlegroups.com.

Gavin Lambert

unread,
Aug 31, 2025, 9:32:40 PM (6 days ago) Aug 31
to innosetup
On Saturday, August 30, 2025 at 4:33:53 AM UTC+12 Pityulin Alexandr wrote:
I can get the output using ExecAndCaptureOutput method, but I need to execute the application with user rights. How can I get the output using ExecAsOriginalUser, or lower the rights before calling ExecAndCaptureOutput?

It's very strongly recommended to avoid doing any per-user setup in the installer (ExecAsOriginalUser is still not necessarily the user that may be running your app).

Instead, you should check at each startup whether initial setup or settings upgrade is required, by checking per-user files or HKCU keys at that time.  Don't forget that a single installation might be used by more than one user on a single PC, or at least a different user than the one running the installer.
Reply all
Reply to author
Forward
0 new messages