我需要获得像C:或D:这样的硬盘驱动器号或任何在任何Windows上安装操作系统的文件。
请帮我摆脱这个。
答案 0 :(得分:0)
Section
StrCpy $0 $sysdir 3
DetailPrint $0
SectionEnd
$SYSDIR
是Windows系统目录(通常为C:\Windows\System
或C:\WinNT\System32
,但在运行时检测到这些目录。
StrCpy
的语法为StrCpy user_var(destination) str(source) [maxlen] [start_offset]
,其中maxlen
和start_offset
是可选的。
因此,上面的代码会将$SYSDIR
中的前三个字母复制到$0
变量中。