ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Coding Snacks

[Solved by 4wd] Tool to let me execute Programs with chooseable permission [Ty!]

(1/2) > >>

KodeZwerg:
Hello Coders!

I have the following problem that i somehow can not solve on my own due lack of experience.
I have written a Program that is executed with Admin-Rights.
From that program i run other programs, but i do not want that others get same execution-rights as my own program has.

So my wish would be a little App-Starter where i have an command-line interface like
Parameter 1 = "Application Path + Name" (<- this will be executed)
Parameter 2 = "additional parameters" (<- this could be parsed to Parameter 1 if it helps)
Parameter 3 = True/False "Run As Admin/Run not as Admin" (<- this is most important)

What i tried on my own was a creating a batch file:

--- ---cmd /min /C "set __COMPAT_LAYER=RUNASINVOKER && start "" %1"but target is executed with same Rights that my Application got.

(a wish would be some Delphi Snippet with such ability, but anything that does this job is more than welcomed!)

Can some more experienced help me please?

KodeZwerg:
I attached a testing tool that help quick identify status.
[Solved by 4wd] Tool to let me execute Programs with chooseable permission [Ty!] This i want to achive
[Solved by 4wd] Tool to let me execute Programs with chooseable permission [Ty!] This is what happen

KodeZwerg:
Still no answer, i guess it is impossible than.

@Admin, feel free to delete/remove thread, thanks.

4wd:
Does this help?

https://stackoverflow.com/questions/20218076/batch-file-drop-elevated-privileges-run-a-command-as-original-user

KodeZwerg:
Thank you for reply, sadly it doesnt do the job.
IsAdministrator = False
IsAdministratorAccount = True
IsUACEnabled = True
IsElevated = True
--- End quote ---
Only the "IsAdministrator" Flag will be set to false, i badly need "IsElevated" as False.
Or with other words, thank you for helping to terminate one flag, just one left to go and i am done  :Thmbsup:

Navigation

[0] Message Index

[#] Next page

Go to full version