Skip to content
⌘ NSIS Forum Archive

Extract drive letter of a path

3 posts

Thalion77#

Extract drive letter of a path

How can I extract the drive letter of a given path?

e.g. E:\Install\Setup.exe => E
stb#
StrCpy $0 "E:\Install\Setup.exe"
StrCpy $0 $0 1 ; => "E"

If you want to us network shares (\\machine\share\Isntall\Setup.exe) you could use the SplitPath macro, which can be found here: http://nsis.sourceforge.net/Dynamica...te_directories