more details for RFE #971467

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5092 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2007-04-16 21:17:37 +00:00
parent 45e24287fc
commit 2e9e986454

View file

@ -84,7 +84,20 @@ This is similar to GetFileTime, only it acts on the system building the installe
\c [/SHORT] user_var(output) path_or_file
Assign to the user variable $x, the full path of the file specified. If the path portion of the parameter is not found, the error flag will be set and $x will be empty. If /SHORT is specified, the path is converted to the short filename form.
Assign to the user variable $x, the full path of the file specified. If the path portion of the parameter is not found, the error flag will be set and $x will be empty. If /SHORT is specified, the path is converted to the short filename form. However, if /SHORT is not specified, the path isn't converted to its long filename form. To get the long filename, call GetLongPathName using the System plug-in. Note that GetLongPathName is only available on Windows 98, Windows 2000 and above.
\c StrCpy $INSTDIR $PROGRAMFILES\NSIS
\c SetOutPath $INSTDIR
\c GetFullPathName $0 ..
\c DetailPrint $0 # will print C:\Program Files
\c GetFullPathName /SHORT $0 $INSTDIR
\c DetailPrint $0 # will print C:\Progra~1\NSIS
\c StrCpy $0 C:\Progra~1\NSIS
\c System::Call 'kernel32::GetLongPathName(t r0, t .r1, i ${NSIS_MAX_STRLEN}) i .r2'
\c StrCmp $2 error +2
\c StrCpy $0 $1
\c DetailPrint $0 # will print C:\Program Files\NSIS, where supported
\S2{gettempfilename} GetTempFileName