Old 1st May 2011, 10:12   #1
Junior Member
Join Date: Jan 2011
Posts: 4
Redirect RMDir/del output to Nxs popup dynamically?


Question: is it possible to show the names of the files that are being deleted in a Nxs popup window?

Basically what happens, in my script when the user clicks on a button the main window gets minimized, a Nxs popup appears and some operations take place. Usually I updated the progress through Nxs status messagges but when I'm deleting a lot of files the user won't see any changes going on and is not satisified just to see the marquee progress bar.
Is there a way to have the RMdir/del results be shown in the Nxs popup? I know the Detailed View of the instfiles does it, is there a way to capture that output and push it to Nxs?

Thanks for any replies!
Zargor is offline   Reply With Quote
Old 1st May 2011, 10:28   #2
Major Dude
Join Date: Oct 2006
Posts: 1,892
It might be possible to capture the detailprints, but I don't know how. One workaround I can think of is using findfirst/findnext and deleting all matches one at a time. Then you'll have the filename you're deleting.

Important note: it is a VERY bad idea to do something like "RmDir /r $instdir", especially in the uninstaller. The reason: You should only delete what you KNOW you want to delete. Deleting blindly is very bad practice. In the uninstaller it gets worse, because $instdir equals $exedir in uninstallers. If the user moves uninstall.exe, you'll end up deleting the entire program files, or windows, or even root directory.
MSG is offline   Reply With Quote
Old 1st May 2011, 12:17   #3
Afrow UK
Afrow UK's Avatar
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
You could write a plug-in (or use the System plug-in) to subclass the list view control to capture any LVM_INSERTITEM messages and send WM_SETTEXT to the nxs static control (assuming you can get its handle).

Afrow UK is offline   Reply With Quote
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