Page 1 of 1 1
Topic Options
#173517 - 2007-02-01 08:30 PM Display message to user
JohnQ Offline
Starting to like KiXtart

Registered: 2003-03-04
Posts: 171
I have several scripts that I use to install certain updates, etc... on remote machines. Typically, I use PSEXEC to make the connection to the remnote devices and then I run the script under the context of the local system account. This works well since the user doesn't see anything as the changes are being made. If a reboot is required, I use the Kixtart shutdown function to display a message to the logged on user and then reboot the machine.

Now I have a need to display a message to the user by some means other than the shutdown funtion. Messagebox would be great, but the issue is that since the script is running as the local system account, the user won't see the messagebox.

Does anyone have any suggetions as to how to get around this?

Thanks in advance.

Top
#173519 - 2007-02-01 09:09 PM Re: Display message to user [Re: JohnQ]
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Try adding the un-documented value of 2097152 to your messagebox style parameter. This is the decimal value of symbol MB_SERVICE_NOTIFICATION which means:

Windows NT/2000/XP: The caller is a service notifying the user of an event. The function displays a message box on the current active desktop, even if there is no user logged on to the computer.

-Shawn

Top
#173521 - 2007-02-01 09:43 PM Re: Display message to user [Re: Shawn]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
So Shawn, why not document it in the FAQ and then it will no longer be un-documented?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#173523 - 2007-02-01 09:52 PM Re: Display message to user [Re: Shawn]
JohnQ Offline
Starting to like KiXtart

Registered: 2003-03-04
Posts: 171
Thanks Shawn. I will give that a try. That sounds like the perfect solution.
Top
#173524 - 2007-02-01 10:03 PM Re: Display message to user [Re: Les]
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Les,

I did document them in the FAQ. Couldn't find it earlier but here it is:

Undocumented MessageBox Styles

This particular one isn't listed. If it works, will amend.


Top
#173532 - 2007-02-02 12:57 AM Re: Display message to user [Re: Shawn]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I didn't find the value of 2097152 in your FAQ when I posted.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.067 seconds in which 0.036 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org