Skip to content
⌘ NSIS Forum Archive

Install on Flash Drive

10 posts

lorenzop#

Install on Flash Drive

Hi to all,

I like to install my application only on a flash drive.
Is it possible detech the removable devices?
How to I can install my application on a flash drive?

Thanks for aid.
Best regards,
Lorenzo.
n0On3#
I have a plugin called "driveinfo" that among other things can:

GetDriveFS - Returns the drive's file system name

I guess that removable devices use FAT which HDD don't. I hope this helps.

Plugins are here (sourceforge is on strike right now):
lorenzop#
GetDriveFS gets the file system of a device:
DriveInfo::GetDriveLabel "C:\"
Pop $0
DriveInfo::GetDriveFS "C:\"
Pop $1
MessageBox MB_OK "$0 (C🙂 - $1"

But it presumes that I know all the devices.
How I can get the list of the devices?

I have tried with
${GetDrives} "ALL" "Example2"
Function Example2
MessageBox MB_OK "$9 ($8 Drive)"
Push $0
FunctionEnd

But the compilation gives a script error in $ {GetDrives}…

Can you aid me?

Thanks, best regards.
n0On3#


here's a plugin to enumerate cd-rom drives, also made by Kichik. Maybe you can convince him to make a mix of those 2 plugins he made. 😉


Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.


I also found this that might help you. I just read until that post, the rest is yours 😉
lorenzop#
I am successful to recover all the letters of the drive.
How can I verify that the drive are removable disks?
Not all flash use FAT.

Thanks.
Comm@nder21#
this page on msdn may help you, if you know how to work with the system.dll nsis plugin:
ktucci#
lorenzop, i have the same question regarding removable drive detection, i was wondering if you could share your solution...
lorenzop#
Install on Flash Drive

I've made a DLL with a function "GetDrive" (see attach.); this function returns (in the stack) the name and type of all drive of machine.

Bye.