943,907 Members | Top Members by Rank

Ad:
Jul 4th, 2007
0

batch file query

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
solomonski is offline Offline
24 posts
since Sep 2006
Jul 4th, 2007
0

Re: batch file query

Why don't you run it from admin account ?

Denis
Reputation Points: 22
Solved Threads: 19
Posting Whiz
DenisOxon is offline Offline
345 posts
since Jan 2007
Jul 4th, 2007
0

Re: batch file query

[QUOTE=DenisOxon;398710]Why don't you run it from admin account ?[QUOTE]

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

Click to Expand / Collapse  Quote originally posted by solomonski ...
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.
Reputation Points: 347
Solved Threads: 13
Practically a Posting Shark
arjunsasidharan is offline Offline
812 posts
since Aug 2006
Jul 5th, 2007
0

Re: batch file query

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.
Last edited by solomonski; Jul 5th, 2007 at 6:54 am.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
solomonski is offline Offline
24 posts
since Sep 2006
Jul 5th, 2007
0

Re: batch file query

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
Reputation Points: 22
Solved Threads: 19
Posting Whiz
DenisOxon is offline Offline
345 posts
since Jan 2007
Jul 5th, 2007
0

Re: batch file query

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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
solomonski is offline Offline
24 posts
since Sep 2006
Jul 5th, 2007
0

Re: batch file query

Click to Expand / Collapse  Quote originally posted by solomonski ...
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
Reputation Points: 22
Solved Threads: 19
Posting Whiz
DenisOxon is offline Offline
345 posts
since Jan 2007
Jul 9th, 2007
0

Re: batch file query

Could somebody with batch file or scripting experience please help me out here?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
solomonski is offline Offline
24 posts
since Sep 2006
Jul 9th, 2007
0

Re: batch file query

Click to Expand / Collapse  Quote originally posted by solomonski ...
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
Last edited by DenisOxon; Jul 9th, 2007 at 1:59 pm.
Reputation Points: 22
Solved Threads: 19
Posting Whiz
DenisOxon is offline Offline
345 posts
since Jan 2007
Jul 10th, 2007
0

Re: batch file query

Could somebody with batch file or scripting experience please help me out here as problem isnt sorted.
Last edited by solomonski; Jul 10th, 2007 at 12:44 pm.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
solomonski is offline Offline
24 posts
since Sep 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Windows NT / 2000 / XP Forum Timeline: Will this work?
Next Thread in Windows NT / 2000 / XP Forum Timeline: whats get deleted when repairing windows XP





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC