Old 4th January 2005, 14:44   #1
Unregistered666
Guest
 
Posts: n/a
Launching a Java program does not open its window in top

Hi.

We are mainly working with Java, and hence, we use a Java installer for it. Anyway, to avoid trouble and provide guidance if Java is not properly installed, we have a mini NSIS installer that checks that the proper version of Java is installed, shows a message if it is not and launches the main Java installer if it is (using Exec; once the Java installer has been launched the NSIS installer exits).

We are having a trouble on Windows XP and 2000 - NT4 and 9x are not supported -. To install, we open the folder where the executable lies and double click it. Then it opens the window with the Java installer, but the explorer windows keeps in top of it, hidding the installer from the users (it appears in the task bar, but to see it you must close/minimize the explorer or click sometimes on it in the task bar). It does not happen always, but often. I do not want if this is a Java, NSIS or Windows issue, but when calling the installer without using the NSIS we have not noticed this problem.

Thanks In Advance. Sergio.
  Reply With Quote
Old 4th January 2005, 15:54   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,342
Can you attach a script showing this behavior?

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 7th January 2005, 12:34   #3
Unregistered666
Guest
 
Posts: n/a
Here is the script.

One thing I have noticed is that it may be related with the time needed to launch the application. When I launch it from CD the behavior is usually the one cited above. But if I copy it to HD and launch it from here, then usually the new windows appears on top of the file explorer.
Attached Files
File Type: nsi install.nsi (7.7 KB, 67 views)
  Reply With Quote
Old 7th January 2005, 13:00   #4
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
I had the similar problem with AdvSplash, but if 1) BGGradient enabled and 2) on Win2K only. After splash window dissapears, installer goes to background (Welcome page appears under Windows Explorer window). And on the big packages only, so time might be important too.
Takhir is offline   Reply With Quote
Old 7th January 2005, 14:33   #5
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,342
It probably happens because, while the Java installer is loading, the NSIS installer closes and returns focus back to Explorer. Because the Java installer hasn't captured the focus on time, it remains on Explorer. I'd try using ExecWait to execute the installer. If it doesn't help, the Java installer probably executes another process and exists. There should be some documentation about the Java installer at http://java.sun.com/ that should explain which command line switches need to be used to avoid that.

Takhir, your problem is probably similar to the Banner problem that was fixed in previous versions. It showed the same behavior. Check out the show function in Banner.c.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Reply
Go Back   Winamp & SHOUTcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump