As most SMS administrators know, you can set up a program to run "Only when no user is logged on", which is very useful for installing programs that might otherwise conflict with whatever else the logged on user has running. However, when the user logs out, there is no indication to the user that an installation is running and thus, the user can log back in, or shutdown the computer!

Does anyone know of a way to pop up a message box stating something like "An installation is running, please do not shutdown or log in" when there is no user logged in?

[8|]
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Could you try:


SMSClientShowMessage "Application Management", "Installation corrently in progress", 1

Sub SMSClientShowMessage(strTitle, strText, intMessageType)
Dim objUIEvents
On Error Resume Next
Set objUIEvents = CreateObject("SMSCliUI.UIEvents")
objUIEvents.ShowMessage strTitle, Replace(strText, "\n", vbNewLine), intMessageType
Set objUIEvents = Nothing
End Sub
Answered 09/03/2008 by: AngelD
Red Belt

Please log in to comment
0
I've tried your code and it only displays the window if a user is logged on.

I found a utility, psexec, which will display a window on the logon screen. Actually, I've had it all along, just didn't know about the -x option that specifies to run the window on the winlogon desktop.

Thanks for the response, anyway.
Answered 09/04/2008 by: MicrosoftBob
Blue Belt

Please log in to comment
0
Gread that you found a solution.
I've only used the script while the user was logged in so a shot in the dark [;)]
Answered 09/04/2008 by: AngelD
Red Belt

Please log in to comment
0
Hey - i found this article as im looking to do the same thing - however im having some trouble getting the GUI to display at the logon screen with -x

I can get a command prompt showing up - but whenever i start a vbscript, it is fine if im logged on, as it will default to the user session, but it will not run as system at the logon desktop.

are you able to provide an example of how you did it ?
Answered 08/05/2010 by: verukins
Senior Yellow Belt

Please log in to comment
0
Try adding the '/accepteula' argument to your command line.
Answered 08/06/2010 by: VBScab
Red Belt

Please log in to comment
0
yer, thats already in there... not the issue

interesting inve foudn that if i run an .exe or a bat (or a hta) - the program runs fine

if i run cscript with an arguement, no matter the psexec commands, it still runs in the user session.... interesting.... its a simple command cscript <path><scriptname>

to that end ive changed over my program to a HTA - and it now runs fine.
Answered 08/07/2010 by: verukins
Senior Yellow Belt

Please log in to comment
0
Although you have a solution (I *love* HTAs, BTW - scripting+GUI - I'm in heaven!) I'm intrigues to know what the restriction is. Have you tried running the script using the System account (via the old 'AT hh:mm CMD /interactive' ploy to get a System-level command prompt)?
Answered 08/08/2010 by: VBScab
Red Belt

Please log in to comment
0
:-) im a bit the oppoisite - i used to script and hta alot, but now i find i only do it when necessary - some of the stuff you casn do is pretty cool - but i find your better off going to .net as soona s you need a gui (i should point out i hate c# - but can do stuff i have to!)

i too am interested as to why the cscript wont run on the desktop... i added the command via AT - still the same issue - do see the command prompt flash up quickly.

In addition, i noticed that running the hta on windows 7 - doesnt show up (know its running, can see the process initiated) - so looks like its only a solution for XP.
Answered 08/08/2010 by: verukins
Senior Yellow Belt

Please log in to comment
0
The "problem" with .Net is that to do the UI stuff, you need a development environment, whereas with HTAs, you need only a text editor.

Do post your solution if you ever track it down. As I say, I'm intrigued.
Answered 08/09/2010 by: VBScab
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity