0

I see many threads here about how can a software be programmed to ask for administrator privileges on Windows, but in my case I have a software installer that runs with administrator privileges and, in the end of installation, it must execute another process with limited privileges (as the logged user). Both installer and installed softwares was created by me using Delphi.

I am researching about this subject for all day long and it seems to be a very difficult task to achieve by programm language only. My question is if there is some Windows command that I can use to "call" the executable with lower privileges or maybe a manifest configuration that I can incorporate to the installed software to avoid it runs with admin privileges. Well, any ideas are welcome!

Thank you!

  • If you think the question is not pertinent or whatever, please explain me why before to downgrade. Thanks! – Guybrush Jan 31 '18 at 23:19
  • I saw this question before and tried some of the solutions, without success. I will make new tests and let you know. Thank you! – Guybrush Feb 1 '18 at 2:33
  • If you exhaust the options offered in the proposed duplicate question, edit your question to indicate your efforts and be specific about why it's not a duplicate. – I say Reinstate Monica Feb 1 '18 at 2:37
  • I achieved my goal scheduling a Windows task (task manager), running and deleting it in the sequence, using the command schtasks. None of the solutions pointed in the similar question worked for me. Please, must I edit my question to include my solution? – Guybrush Feb 2 '18 at 19:15
  • 1
    No, instead please post your solution as an answer to your question. Glad you found a solution! – I say Reinstate Monica Feb 2 '18 at 19:19
1

I tried all the solutions pointed in the similar question, without success. My workaround was to use the schtasks command inside a BAT file to schedule a Windows task, run and delete it in the sequence.

First I create a task manually using the Task Scheduler and exported it to a XML file (right-click > Export).

enter image description here

After I created a BAT file to do the job based on the XML file:

schtasks /create /tn "TempTask" /xml "c:\temp.xml"
schtasks /run /tn "TempTask"
schtasks /delete /f /tn "TempTask"

Hope it helps other people with same issue! Thanks!

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.