Old 8th February 2006, 09:27   #1
rmccue
Member
 
Join Date: Aug 2005
Location: Australia
Posts: 71
usb controls

Is there a way to have USB controls like Safely Remove Device and such?
If not could someone make a plugin please
rmccue is offline   Reply With Quote
Old 9th February 2006, 10:44   #2
onad
Senior Member
 
onad's Avatar
 
Join Date: Dec 2004
Location: Turkey
Posts: 447
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.

"Just do it"
onad is offline   Reply With Quote
Old 10th February 2006, 11:05   #3
rmccue
Member
 
Join Date: Aug 2005
Location: Australia
Posts: 71
Yep thats what I want to do
rmccue is offline   Reply With Quote
Old 10th February 2006, 21:28   #4
rmccue
Member
 
Join Date: Aug 2005
Location: Australia
Posts: 71
so how can i do it?
rmccue is offline   Reply With Quote
Old 12th February 2006, 02:15   #5
rmccue
Member
 
Join Date: Aug 2005
Location: Australia
Posts: 71
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
rmccue is offline   Reply With Quote
Old 13th February 2006, 19:30   #6
rmccue
Member
 
Join Date: Aug 2005
Location: Australia
Posts: 71
and is there any dll that i can call
rmccue is offline   Reply With Quote
Old 13th February 2006, 19:36   #7
rmccue
Member
 
Join Date: Aug 2005
Location: Australia
Posts: 71
and is there a dll i can call
rmccue is offline   Reply With Quote
Old 14th February 2006, 19:19   #8
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
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.

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
Old 15th February 2006, 07:02   #9
rmccue
Member
 
Join Date: Aug 2005
Location: Australia
Posts: 71
Nothing on MSDN
I have found hotplug.dll which looks interesting...
rmccue is offline   Reply With Quote
Old 15th February 2006, 14:19   #10
onad
Senior Member
 
onad's Avatar
 
Join Date: Dec 2004
Location: Turkey
Posts: 447
http://msdn.microsoft.com/library/de...trol_codes.asp

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.

"Just do it"
onad is offline   Reply With Quote
Old 15th February 2006, 17:40   #11
onad
Senior Member
 
onad's Avatar
 
Join Date: Dec 2004
Location: Turkey
Posts: 447
Lightbulb

Well OK I was in a good mood, the attatched Delphi source file will get you (or me , or maybe someone else started...
Attached Files
File Type: txt saferemovalmain.pas.txt (9.5 KB, 1230 views)

"Just do it"
onad is offline   Reply With Quote
Old 16th February 2006, 06:03   #12
rmccue
Member
 
Join Date: Aug 2005
Location: Australia
Posts: 71
Damn
Just uninstalled Delphi
Could someone compile this please?
rmccue is offline   Reply With Quote
Old 16th February 2006, 10:58   #13
onad
Senior Member
 
onad's Avatar
 
Join Date: Dec 2004
Location: Turkey
Posts: 447
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.

"Just do it"
onad is offline   Reply With Quote
Old 16th February 2006, 18:04   #14
Comm@nder21
Major Dude
 
Join Date: Jul 2003
Location: germany, b-w
Posts: 734
Send a message via ICQ to Comm@nder21
delphi sucks :P

because you cant build the universe on E = m * Delphi², can you?
Comm@nder21 is offline   Reply With Quote
Old 18th February 2006, 02:34   #15
rmccue
Member
 
Join Date: Aug 2005
Location: Australia
Posts: 71
This is what brings up the dialog:
rundll32.exe shell32.dll,Control_RunDLL hotplug.dll

How do call this from a script?
rmccue is offline   Reply With Quote
Old 19th February 2006, 18:58   #16
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
With ExecWait.

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
Old 25th February 2006, 03:15   #17
rmccue
Member
 
Join Date: Aug 2005
Location: Australia
Posts: 71
Is anyone working on this plugin?
rmccue is offline   Reply With Quote
Old 25th February 2006, 21:19   #18
rmccue
Member
 
Join Date: Aug 2005
Location: Australia
Posts: 71
If not can someone please
rmccue is offline   Reply With Quote
Old 1st March 2006, 19:32   #19
rmccue
Member
 
Join Date: Aug 2005
Location: Australia
Posts: 71
This plugin would be really handy if someone developed
rmccue 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