Skip to content
⌘ NSIS Forum Archive

usb controls

19 posts

rmccue#

usb controls

Is there a way to have USB controls like Safely Remove Device and such?
If not could someone make a plugin please
onad#
You problem is not really clear, BUt i read it like: when install begins I want to send an command to the OS as same as someone would have clicked "Savly remove hardware", Is this correct?

NOTE:
Most of the time if you need a feature like this you installer strategy is wrong.

And yes, theoretically one can create a plugin for this or use the System plugin.
rmccue#
I have noticed that I could use devcon but that needs too much config by the user
Since my installer is always on a USB could it just use the current drive letter
kichik#
You should search MSDN for information on this. If you find out a piece of code that does this, someone here will surely be able to help you converting it into NSIS code.
onad#


Theoretically I could create a plugin yes, but sorry I do not even have time improve and to modify the only plugin I wrote for NSIS.
onad#
Well OK I was in a good mood, the attatched Delphi source file will get you (or me 😉 , or maybe someone else started...
onad#
It is just the essential code, not a whole NSIS plugin. You have to create this yourself or mimic the behaviour by using the NSIS System plugin.

Well combine the example Delphi NSIS plugincode with this code and you are well on your way to your goal.

Yes, sadly most of the time programming takes a lot of persistence and effort, nothing else helps there 😉

Good luck.
Comm@nder21#
delphi sucks :P 😉 😁

because you cant build the universe on E = m * Delphi², can you?
rmccue#
This is what brings up the dialog:
rundll32.exe shell32.dll,Control_RunDLL hotplug.dll

How do call this from a script?