Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Computer Shut down from VFP

Status
Not open for further replies.

Nro

Programmer
May 15, 2001
337
CA
Hi

I want to know if it's possible to shut down a station from VFP. I did not search the Windows API but I want your opinion first.

The idea is to have a small VFP program to work as a service. There is a timer that is looking for a certain hour (12:00 for exemple), it start a procedure and when it's finish, it shut down the station. Everyting must be automated.

The station is a Windows 2000 Pro. I'm working with VFP 8.0

Thanks

Nro
 
Nro,

Have a look at the information and code provided at:

boyd.gif

SweetPotato Software Website
My Blog
 
Thanks Craig.

It's exactly what I'm looking for. I'll let you know if it's working.

Nro
 
Or

Code:
run shutdown -r


-i Display GUI interface, must be the first option

-l Log off (cannot be used with -m option)

-s Shutdown the computer

-r Shutdown and restart the computer

-a Abort a system shutdown

-m \\computername Remote computer to shutdown/restart/abort

-t xx Set timeout for shutdown to xx seconds

-c "comment" Shutdown comment (maximum of 127 characters)

-f Forces running applications to close without warning
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top