Old 9th November 2005, 13:41   #1
DanielMM
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)
DanielMM is offline   Reply With Quote
Old 9th November 2005, 17:56   #2
goldy1064
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.
goldy1064 is offline   Reply With Quote
Old 10th November 2005, 08:18   #3
DanielMM
Junior Member
 
Join Date: Nov 2005
Posts: 2
Yes, but how get "value of progress"?
DanielMM is offline   Reply With Quote
Old 10th November 2005, 09:14   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
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
Afrow UK is offline   Reply With Quote
Old 10th November 2005, 09:42   #5
Takhir
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?
Takhir is offline   Reply With Quote
Old 13th November 2005, 00:44   #6
onad
Senior Member
 
onad's Avatar
 
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
onad is offline   Reply With Quote
Old 13th November 2005, 08:02   #7
Takhir
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.
Takhir is offline   Reply With Quote
Old 13th November 2005, 20:50   #8
onad
Senior Member
 
onad's Avatar
 
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!
onad 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