Zargor
1st May 2011 10:12 UTC
Redirect RMDir/del output to Nxs popup dynamically?
Hello,
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!
MSG
1st May 2011 10:28 UTC
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.
Afrow UK
1st May 2011 12:17 UTC
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).
Stu