Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Always Run as Administrator

44 views
Skip to first unread message

Peter

unread,
Aug 10, 2020, 1:02:44 PM8/10/20
to
How can I set a particular batch file so that it always runs as an administrator (with administrative privileges)?

Zaidy036

unread,
Aug 10, 2020, 3:43:24 PM8/10/20
to
On 8/10/2020 1:02 PM, Peter wrote:
> How can I set a particular batch file so that it always runs as an administrator (with administrative privileges)?
>
use a shortcut to run and under "Advanced" in shortcut check Run as
Administrator

Peter

unread,
Aug 10, 2020, 4:56:00 PM8/10/20
to
That's what I was thinking but was wondering if there's any other way. For example, if I were to use the Call command in batch file #1 to start batch file #2, is there any way to get the Call command to make batch file #2 to run as an administrator? Or something along those lines?

Zaidy036

unread,
Aug 10, 2020, 8:21:37 PM8/10/20
to
On 8/10/2020 4:55 PM, Peter wrote:
> That's what I was thinking but was wondering if there's any other way. For example, if I were to use the Call command in batch file #1 to start batch file #2, is there any way to get the Call command to make batch file #2 to run as an administrator? Or something along those lines?
>
Another method is to define a Task Scheduler job with "highest
privileges" and "can run manually" to run the batch you want and then
run the TS job using SCHTASKS.EXE /RUN /TN "task name" in another batch.

Peter

unread,
Aug 13, 2020, 7:32:57 PM8/13/20
to
Thanks! The solution using SCHTASKS.EXE seems to be the best method and is working well for me so far.
0 new messages