|
|
#1 |
|
Junior Member
Join Date: Nov 2005
Posts: 2
|
how to get information about progress
hi
1. I prepared nsis installer "installprogram.exe" 2. I run this installer form another program "MyProgram" in "silent mode" 3. how can I get the information about instalation progress ( I want to display progress in MyProgram) |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Jun 2005
Posts: 211
|
You could write to a text file that has progress=x% and then read it from the main installer. Don't forget to use a mutex on this file when reading/writing, though.
|
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Nov 2005
Posts: 2
|
Yes, but how get "value of progress"?
|
|
|
|
|
|
#4 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
If you mean % complete, then you can't unless you write the % complete to the registry or an INI file between each instruction in your installer.
In other words, if you only have 4 File instructions you can only have 3 instructions writing "25%". -Stu |
|
|
|
|
|
#5 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
If MyProgram can get window handle for installer's progress bar, so it can get ProgressBar range and position every 500 ms (while handle is valid - IsWindow()). This case you don't need any script updates. The problem is $HWNDPARENT is 0. Can yow run installer in the Windows hidden mode (SW_HIDE), but not in NSIS silent mode?
|
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Dec 2004
Location: Turkey
Posts: 447
|
You could make it not silent but move the dialog offscreen.(See sendmessages and search this forum) You still can have a handle that way.
BTW this would not be MY preferred way of doing it, but he if it helps you it's fine
|
|
|
|
|
|
#7 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
|
Installer button still presents on the TaskBar even if it's window is out of screen. And, of course, message hooking is better way for progress bar position tracking, but this require a bit more complex code.
|
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Dec 2004
Location: Turkey
Posts: 447
|
Yes, that takes effort, but if the requested features are better for the enduser, the more energy it takes.
Sad, but a reality specific when talking about programming. Be persistant, success! |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|