batch file query

Reply

Join Date: Sep 2006
Posts: 20
Reputation: solomonski is an unknown quantity at this point 
Solved Threads: 0
solomonski solomonski is offline Offline
Newbie Poster

batch file query

 
0
  #1
Jul 4th, 2007
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.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 332
Reputation: DenisOxon is an unknown quantity at this point 
Solved Threads: 17
DenisOxon's Avatar
DenisOxon DenisOxon is offline Offline
Posting Whiz

Re: batch file query

 
0
  #2
Jul 4th, 2007
Why don't you run it from admin account ?

Denis
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 812
Reputation: arjunsasidharan is on a distinguished road 
Solved Threads: 13
arjunsasidharan's Avatar
arjunsasidharan arjunsasidharan is offline Offline
Practically a Posting Shark

Re: batch file query

 
0
  #3
Jul 4th, 2007
[QUOTE=DenisOxon;398710]Why don't you run it from admin account ?[QUOTE]

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

Originally Posted by solomonski View 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.
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.
There is just two ways to live your life.
One is as though nothing is a miracle.
The other is as if everything is.
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 20
Reputation: solomonski is an unknown quantity at this point 
Solved Threads: 0
solomonski solomonski is offline Offline
Newbie Poster

Re: batch file query

 
0
  #4
Jul 5th, 2007
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 5:54 am.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 332
Reputation: DenisOxon is an unknown quantity at this point 
Solved Threads: 17
DenisOxon's Avatar
DenisOxon DenisOxon is offline Offline
Posting Whiz

Re: batch file query

 
0
  #5
Jul 5th, 2007
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
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 20
Reputation: solomonski is an unknown quantity at this point 
Solved Threads: 0
solomonski solomonski is offline Offline
Newbie Poster

Re: batch file query

 
0
  #6
Jul 5th, 2007
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.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 332
Reputation: DenisOxon is an unknown quantity at this point 
Solved Threads: 17
DenisOxon's Avatar
DenisOxon DenisOxon is offline Offline
Posting Whiz

Re: batch file query

 
0
  #7
Jul 5th, 2007
Originally Posted by solomonski View Post
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
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 20
Reputation: solomonski is an unknown quantity at this point 
Solved Threads: 0
solomonski solomonski is offline Offline
Newbie Poster

Re: batch file query

 
0
  #8
Jul 9th, 2007
Could somebody with batch file or scripting experience please help me out here?
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 332
Reputation: DenisOxon is an unknown quantity at this point 
Solved Threads: 17
DenisOxon's Avatar
DenisOxon DenisOxon is offline Offline
Posting Whiz

Re: batch file query

 
0
  #9
Jul 9th, 2007
Originally Posted by solomonski View Post
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 12:59 pm.
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 20
Reputation: solomonski is an unknown quantity at this point 
Solved Threads: 0
solomonski solomonski is offline Offline
Newbie Poster

Re: batch file query

 
0
  #10
Jul 10th, 2007
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 11:44 am.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Windows NT / 2000 / XP Forum


Views: 2687 | Replies: 9
Thread Tools Search this Thread



Tag cloud for Windows NT / 2000 / XP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC