Old 8th May 2005, 21:25   #1
SenseiSimpleton
Junior Member
 
Join Date: May 2005
Posts: 1
Drag and drop "Delete on Reboot" widget

This is kinda going off the context of using NSIS for installers, but it has so many useful features that it can be used for so many other things.

i want to make a simple app that deletes files that windows has locked, on reboot, in the following ways:

1. Accepts files dragged onto the exe icon
> a large group of files or single file.. this runs the program and the programs tries to delete all the files using the /REBOOTOK switch.

2. when you open the EXE, there is a small square drag-drop target window to which you can drag and drop files in the same way as above.

3. Add a context menu item to all files (this part is easy enough) which lets you right click a stuck file and say "delete on reboot" (or simply "Delete") and it takes the appropriate action (delete or delete on reboot).

It's easy enough to just hardcode in the file to be deleted but how could it accept dragged files and translate that into their paths and subsequently loop through all the files and run the delete or take the command from context menu and get the file name of the file to be deleted?

i havent been able to find anything about dragging and dropping onto an install (with good reason, i dont know why anyone would need that under normal circumstances.

This is justa small personal project but any help would be much appreciated.. i'm sure many people would find this simple app very useful since windows has that nasty habit of keeping files which are no longer running locked, sometimes indefinitely.
SenseiSimpleton is offline   Reply With Quote
Old 10th May 2005, 20:16   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
The paths of files that are dragged onto an executable icon are passed on the command line. You should parse $CMDLINE to get them.

Making the installer window itself a drop target would require a plug-in. See this MSDN page for more information.

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