Old 27th January 2007, 05:01   #1
xino25
Junior Member
 
Join Date: Jan 2007
Posts: 4
getdrives and locate

hi all
i have a newbie question
in post http://forums.winamp.com/showthread....hreadid=210817 there was this script by sreedhar_kumar for getting drive types and another script for serching files by predefined vars (filename/drive etc...)
if ${GetDrives} detects one of my drives as FDD, is there a way to use ${GetDrives} "FDD" and then use "locate" on the drive letter found without searching drive a:?

i'm trying to run a search on a mis-identified thumb-drive (which changes it's drive letter each time i disconnect it) and still skip searching the real floppy drive.

help would be appriciated.
xino25 is offline   Reply With Quote
Old 30th January 2007, 09:40   #2
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
code:
Name "Test"
OutFile "Test.exe"

!include "FileFunc.nsh"
!insertmacro Locate
!insertmacro GetDrives

Section
StrCpy $R0 ''
${GetDrives} "FDD" "GetDrivesCallback"

StrCmp $R0 '' quit
MessageBox MB_OK '$R0'

quit:
SectionEnd

Function GetDrivesCallback
StrCmp $R9 "a:\" continue
${Locate} "$9" "/L=F /M=LocalMedicFiles.mdf /G=1" "LocateCallback"

continue:
Push $0
FunctionEnd

Function LocateCallback
StrCpy $R0 $R9
StrCpy $0 StopLocate

Push $0
FunctionEnd

Instructor is offline   Reply With Quote
Old 30th January 2007, 13:25   #3
xino25
Junior Member
 
Join Date: Jan 2007
Posts: 4
thanks ALOT
saved me quite alot of messing around with external search using VBS and some registry flags
thanks again
xino25 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