Archive: How to get installation drive name


How to get installation drive name
Hello,
I want to get the installation drive where i install the particular installer. actually i need to delete some folder on installation drive. so can any one suggest how i do this.???
Thanks


What are you after? The hardware info for a drive (and its partition)? (I ask this because you can't just take the first 3 letters of a full path and expect to get the correct drive letter for a folder deep in a path, for example: "c:\foo\bar" bar might not actually be on c: if foo is a mount point for a different partition)


If you want the location of the installer, look at:
http://nsis.sourceforge.net/Docs/Chapter4.html#4.2.3


Edit: Anders is of course right. StrCpy is not the best way to go.


I want to get the drive name there i install the particular software. like i install the particular software at c:\Programe Files\ABC
but i want to get only drive name like "C:\" only not the full installation path. so there is any direct method to get the installation drive.


I just told you, for a path like "c:\Programe Files\ABC", ABC might NOT be on c:\

If you want to do this correctly, call GetVolumePathName with the system plugin on 2000 and later, and on older systems, just use strcpy to copy the first 3 letters

If you don't care, just use strcpy on all systems