![]() |
#1 |
Junior Member
Join Date: Nov 2017
Posts: 4
|
About Detect Drives function
I've been looking for a while (3 hours ;~
![]() Im really new to nsis and I can't find any example using that so as my last resort I've posted here. Whenever I add the function directly to the code, because I dont know any other way, and I call it from the section I have it like this: code: I always get an error on te CallbackFunction. Processed 1 file, writing output (x86-ansi): Adding plug-ins initializing function... Done! Error: resolving install function "CallbackFunction" in install section "" (0) Note: uninstall functions must begin with "un.", and install functions must not Error - aborting creation process I don't know if Im doing anything wrong or its missing anything. How do I fix this? Note: Im trying to use this function to get the Driver Letter from a pendrive. Thanks in advance -Dxmega |
![]() |
![]() |
![]() |
#2 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,452
|
Did you delete your stackoverflow question? I was about to ask, do you only care about the volume name?
CallbackFunction is a function you have to implement yourself, it is called once for each drive. IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: Nov 2017
Posts: 4
|
Yes I did indeed delete the stack over flow question, because I thought I didnt correctly asked it how I should.
Id like to know the name well the letter more exactly like: E:/ or C:/ or D:/. |
![]() |
![]() |
![]() |
#4 | ||
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,452
|
I know you want the drive letter but we need to know what you can use to identify the drive. On Stackoverflow you said something about a name? Kingston? Is that the volume label? Is there anything else you can look for? A file on the thumb drive?
I was going to answer you on Stackoverflow with code checking the volume label but you deleted it too soon. Edit: From your deleted question Quote:
Quote:
IntOp $PostCount $PostCount + 1 |
||
![]() |
![]() |
![]() |
#5 |
Junior Member
Join Date: Nov 2017
Posts: 4
|
I do know the name of the folder inside of the pendrive. (The folder will never leave the pendrive.)
And KINGSTON is the name of the pendrive aka Volume Label. |
![]() |
![]() |
![]() |
#6 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,452
|
Something like this perhaps:
PHP Code:
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#7 |
Junior Member
Join Date: Nov 2017
Posts: 4
|
Im sorry I couldn't reply sooner, my pendrive stopped working so I couldn't test it.
However this is exactly what I needed! Thank you ![]() |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|