Mine
public text v1 · immutableFunction un.DeleteFile
Exch $R0
GetTempFileName $0
StrLen $1 $0
IntOp $1 $0 - $1
IntOp $3 0 + 0
beginloop:
IntOp $3 $3 - 1
StrCpy $2 $0 1 $3
StrCmp $2 "\" handlefile checkforward
checkforward:
StrCmp $2 "\" handlefile beginloop
handlefile:
IntOp $3 $3 + 1
IntOp $4 $3 * -1
StrCpy $5 $0 $4 $3
;MessageBox MB_OK|MB_ICONEXCLAMATION "$5"
Rename $R0 $INSTDIR\$5
Delete /REBOOTOK $0
FunctionEnd