I would like to schedule certain pcs to shutdown at set times of the day. I have created a batch file with the text "shutdown -s -f" however as im running it through a limited user account it fails saying i dont have the appropriate permissions.
Is there a string i can use after the shutdown command that will look at my admin account for verification.
Any help appreciated.

Recommended Answers

All 9 Replies

Why don't you run it from admin account ?

Denis

Why don't you run it from admin account ?


He can't. No one can if its an office PC..

I would like to schedule certain pcs to shutdown at set times of the day. I have created a batch file with the text "shutdown -s -f" however as im running it through a limited user account it fails saying i dont have the appropriate permissions.
Is there a string i can use after the shutdown command that will look at my admin account for verification.
Any help appreciated.

I guess you have to do it from your Admin account. Why don't you try resetting your admin's password entering into his accountand then enabling your limited account to administration account or enable certain rights, that should help. There is a way to change the admin's password.

Ive written batch files before that work fine via the limited user account however the switch within the file "/user:accountname accountpassword" doesnt seem to work with the shutdown command.
Im just after the appropiate switch for the task i shouldnt need to do anything within the admin account.

If you build your batch file and then put a shortcut on the desktop. Depending on the operating system you should be able to Run as, which gives you the option to enter admin username and password.

Denis

I want to be able to schedule the task. I.e forget about it and let it run itself with no intervention.
The key is in the command syntax for the batch file. Its the command im after not a work around.

I want to be able to schedule the task. I.e forget about it and let it run itself with no intervention.
The key is in the command syntax for the batch file. Its the command im after not a work around.

If you use windows Task Scheduler wizard then it asks for user name and password to use to schedule the task.

Problem solved ?

Denis

Could somebody with batch file or scripting experience please help me out here?

I
Is there a string i can use after the shutdown command that will look at my admin account for verification.

The answer is NO - at least not according to the shutdown help file.

In order to schedule the running of your batchfile you have to use the Scheduler.

Run the scheduler wizard to run your batch file at thye time you want it to run. When prompted enter username and password, in this case admin.

Problem sorted I believe

Denis

Could somebody with batch file or scripting experience please help me out here as problem isnt sorted.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.