Problem: GetTempFileName & Upgrade Shared-DLLs
Hi All,
My OS is Windows 9x, and in my autoexec.bat has (red) lines :
SET TEMP=C:\WINDOWS\TEMP
:temp=c:\windows\temp is default by Windows, but I re-set for sure an existing TEMP environment
:then remove all temporary files in TEMP folder that countn't be deleted because PC halted, Software halted or bad softwares have been created
IF NOT EXIST %TEMP%\*.* GOTO endbat
ECHO Y | DEL %TEMP%\*.* > NUL
:endbat
In .NSI:
Push $SYSDIR\xyz.dll
!insermacro UpgradeDLL xyz.dll
;Reboot
After running installer, I found in WININIT.INI, such as
[rename]
C:\WINDOWS\SYSTEM\xyz.dll=C:\WINDOWS\TEMP\nst_unique.TMP
After restarting computer, the file nst_unique.TMP in C:\WINDOWS\TEMP has been deleted (ensuant on the autoexec.bat) before Windows loads. And the file xyz.dll cannot be upgraded.
I think, the best of this case is never copy nst_unique.TMP to $TEMP
If and when GetTempFileName only assigned to user-var a value "filename.tmp" instead of "$TEMP\filename.tmp", then I want, I'll use such as "$SYSDIR\filename.tmp", "$INSDIR\filename.tmp", "$TEMP\filename.tmp", etc.
In the meantime, can get "filename.tmp":
GetTempFileName $0
Push $0 ; ex: $0 = C:\WINDOWS\TEMP\nst_unique.TMP
Call Filename
Pop $0 ; ---> $0 = nst_unique.TMP
Function Filename
; You are easy to write this code
FunctionEnd
Sorry my bad English... too. :cry:
So I hope you understand what I mean.