Jump to content

Recommended Posts

Posted

when i try and run a batch file in vista the line just loops and has no effect any ideas

 

shutdown -s -m \\PC01 -t 60 -c "Shutting down system"

 

this just loops in a dos window :S

 

now if i add

 

START shutdown -s -m \\PC01 -t 60 -c "Shutting down system"

 

things gett messy lol (windows continuosly opening)

 

Edit:- Tries using a vbs script to sendd to dos window that failed as well any ideas anyone?

 

or even a shutdown script that runs directly through vbs?

Posted

Not sure if the AT command still works in Vista, but it works with XP, Server 2003.

Go to a command prompt (DOS box) type 'at 00:00 shutdown -s -m \\PC01 -t 60 -c "Shutting down system"'

where 00:00 is the time you want this to take place.

I assume Vista has the shutdown command.

Posted

as long as the AT command is still available in Vista it should work.

I use this method to reboot the servers during the night & to shutdown machines after a certain time.

To find out the full list of parameters type 'at -?' at a command prompt.

You can specify days of the week, so that this is a scheduled task & is not deleted after it has run once.

  • 2 weeks later...
Posted

After a bit of testing i got the file to work the user had permissions over the domain and local admin permissions, but i still have to right click the batch file and run as administrator!

 

any way i thought no matter i will use compatibility in the shortcut to set it to always run as admin but this option is greyed out so anyone got any ideas to enable this i am guessing somewhere vista block bats being set to auto admin, any one ?

Posted

This is purely from my own limited experience of Vista on my home system but it seems to have a general hatred of all things .BAT.

However try using the extension .CMD instead. It works for very simple batch files eg. the sort used to launch Java apps.

Not sure what syntax differences there are between .BAT and .CMD (may be none).

Give it a try.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...