Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.

Desktop/Laptop shutdown policy

Created: 03 Apr 2012 | 6 comments

Hi

We want to deploy desktop or laptop shutdown policy, but before shutdown the computer user get promt of yes or No

So that user decide whether he wants to shutdown or not

Can we do this in Altiris CMS 7.1

Comments 6 CommentsJump to latest comment

Lippi's picture

Yes, you can do it.

But you will need to create a custom shutdown task using VBS script.

There is an example:

Option Explicit
Dim objShell, intShutdown
Dim strShutdown, strAbort

' -s = shutdown, -t 120 = 2 minutes, -f = force programs to close
strShutdown = "shutdown.exe -s -t 120 -f"
set objShell = CreateObject("WScript.Shell")
objShell.Run strShutdown, 0, false

'go to sleep so message box appears on top
WScript.Sleep 100

' Input Box to abort shutdown
intShutdown = (MsgBox("Computer will shutdown in 2 minutes. Do you want to cancel computer shutdown?",vbYesNo+vbExclamation+vbApplicationModal,"Cancel Shutdown"))
If intShutdown = vbYes Then
' Abort Shutdown
strAbort = "shutdown.exe -a"
set objShell = CreateObject("WScript.Shell")
objShell.Run strAbort, 0, false
End if

Wscript.Quit

Att,

Lippi

CBZ9104's picture

Hi 

Thanks for the reply

but where we get shutdown.exe

CBZ9104's picture

Hi

The runs successfully as i am expected. but the problem is when we going to check report Reports --- All reports --- Task Status --- status summary by jobs/task here i am getting successfull and failed count but if i drill down this report in computer name it showing NS Server name instead of Client system name.

JMP51483's picture

Here is another option for you as well... It's actually an article here on Connect:

https://www-secure.symantec.com/connect/articles/s...

JCMR Technology - Charlotte, NC
Symantec Platinum Partner

JimChud's picture

I have a problem that once it has ran once the policy goes compliant and even though it should check for compliancy the next day / hour etc it doesnt retry if it was previously successful.

has anyone else had this issue?

Regards Jim.
Connect Etiquette: "Mark as Solution" those posts which resolve your problem and give a thumbs up to useful comments, articles and downloads.