Page 1 of 1 1
Topic Options
#207486 - 2013-07-24 10:14 AM MessageBox not dispalying with Windows 7
yellowdog Offline
Starting to like KiXtart

Registered: 2005-06-14
Posts: 102
Hello,

I have scripts for applications deployement launched as the PC starts up (Computer GPO Startup scripts), the problem is that the MessageBox command do not display any message.
The script is runing fine (installs the application), but no message displayed.

When deploying applications, the user as to wait until the application is installed but without any message, it 's not easy and if the user opens the session while it's processing the installation, then the deployement fails.

What do I have to do to display messages at startup ?

Top
#207498 - 2013-07-26 09:23 AM Re: MessageBox not dispalying with Windows 7 [Re: yellowdog]
yellowdog Offline
Starting to like KiXtart

Registered: 2005-06-14
Posts: 102
Nobody has encountered that problem already ????????
Top
#207499 - 2013-07-26 09:59 AM Re: MessageBox not dispalying with Windows 7 [Re: yellowdog]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
I'm not sure if it is possible to display a messagebox with kix during windows satartup.

This might be an option: http://www.door2windows.com/how-to-automatically-display-a-message-at-windows-startup/
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#207500 - 2013-07-26 12:51 PM Re: MessageBox not dispalying with Windows 7 [Re: Mart]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4403
Loc: New Jersey
That's "at logon" using the RUN registry key, not "at startup". Neat idea, though! ;\)

Startup scripts defined by policy run at system boot (and there are corresponding shutdown scripts as well).. there are separate definitions to run "at logon" and "at logoff". Software is generally installed via startup scripts to avoid interrupting the user, usually when the app customizes the user interface at first run, or doesn't need any customization.

Make sure you're using the right script type in your policy!

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#207517 - 2013-07-26 04:28 PM Re: MessageBox not dispalying with Windows 7 [Re: Glenn Barnas]
yellowdog Offline
Starting to like KiXtart

Registered: 2005-06-14
Posts: 102
Glenn,

Indeed, I use startup scripts to install applications with administrators rights otherwise applications won't install correctly. Then being unable to deploy applications at logon scripts, what is the solution to display messages during startup scripts ?

Top
#207520 - 2013-07-26 06:10 PM Re: MessageBox not dispalying with Windows 7 [Re: yellowdog]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4403
Loc: New Jersey
Well, that's the rub..

I might try something like this two-stage process..

Create a flag (file or reg key) when the install starts and remove it when it completes. This is done with the Startup script.

Use a logon script to check for the presence of the flag, and if it's found, then display a message that the install is in progress. You might even kick off a script if the flag is present to then monitor the status, displaying a 50/100% progress bar or simply a completion message when the startup script removes the flag.

I developed a process that runs at logon - the logon script detects when the install is required and makes a request to a central server. That server then responds to the request by pushing a script down and then using the Task Scheduler to define and immediately execute the install script with specific local admin credentials. Since the user is logged on, the install message can be displayed by the logon script OR by the install script if the Interact With Desktop flag is set in the task scheduler.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#207545 - 2013-07-29 10:44 PM Re: MessageBox not dispalying with Windows 7 [Re: Glenn Barnas]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Startup scripts are run under the System account which by default has probably a couple issues (untested just guessing at what might be going on)

The system account uses it's own profile - thus is not interactive with current user logon and aside from being able to see the underlying process run you may not be able to make the actual dialogbox visible to the current user.

There actually is a process to do that but is for debugging and is not for startup or logon scripting.

From TechNet:
Beginning in Windows Vista, startup scripts are run asynchronously, by default.

Setting startup scripts to run synchronously may cause the boot process to run slowly.

In Windows 7 and Windows Vista, startup scripts that are run asynchronously will not be visible.

Enabling the Run Startup Scripts Visible policy setting will have no effect when running startup scripts asynchronously.

For a Windows 7 computer this might help some if you can get the script to be shown, but again I don't think it is designed to do that and is probably a tweak if you can get it to do it.

The Welcome screen may be displayed for 30 seconds, and the logon script interacts with me when I try to log on to a computer that is running Windows Vista or Windows Server 2008

REG_DWORD:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
DelayedDesktopSwitchTimeout=0

Top
#207553 - 2013-07-30 03:01 PM Re: MessageBox not dispalying with Windows 7 [Re: NTDOC]
yellowdog Offline
Starting to like KiXtart

Registered: 2005-06-14
Posts: 102
Thank you gentlemen for those answers.

I'm gonna test it to see if it suites to what I need.

Top
#207566 - 2013-08-06 01:44 PM Re: MessageBox not dispalying with Windows 7 [Re: yellowdog]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
yes, if you want to get output from the startup script, you need to set it to run synched and visible.
if you don't want to do that, you can do go with Glenn's option.

I once had to deploy office upgrade and the users could not make themselves wait for 20 minutes and the upgrade always failed with async. with synchronised startup you can force compliance with the inconvenience of not able to login right away. but on the other hand deploying something while user is logged on is bound to cause complaints about slow computers...
_________________________
!

download KiXnet

Top
#209753 - 2014-12-24 12:41 AM Re: MessageBox not dispalying with Windows 7 [Re: Lonkero]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4403
Loc: New Jersey
See this post for a discussion on a possible solution, and look for the complete code post in the Script Vault shortly...

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

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
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.069 seconds in which 0.033 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