Machsupport Forum

Mach Discussion => Mach3 under Vista => Topic started by: cesar13 on March 31, 2017, 10:20:59 AM

Title: PC shutdown
Post by: cesar13 on March 31, 2017, 10:20:59 AM
Hi!
I am trying to make a VB script that shutdowns Mach3 and the PC. Reading in some pages, I came across two possibilities:
1.- Shutting down using OEMButton 705.
2.- Shutting down using shell("shutdown.exe -s -t")

Both of them work, they close all the active programs at the moment and begin shutting down the PC. The problem is that it stays in the shutting down window and takes a lot of time for it to shutdown. Both possibilities. I even get desperate and push the reset button on my PC.

Any idea why this is happening? Or any other idea how to do this?

I thnak you all for your answer.

César
Title: Re: PC shutdown
Post by: CES on May 21, 2017, 04:57:11 PM
Hi Cesar,
  Try    "shutdown /l /s / 0"
That's lowercase "L", "S" and a number zero.

/l means log off, /s is shutdown, and /t is set time to shutdown.

Charles