grahama
8th November 2004 23:24 UTC
close a directory
I am trying to close the $TEMP directory after an install
anyone know what the correct syntax is?
I tried using this but am still a bit new to system calls....
FindWindow $0 "Temp"
System::Call 'user32::PostMessageA(i,i,i,i) i($0,${WM_CLOSE},0,0)'
many thanks
g
Afrow UK
9th November 2004 18:52 UTC
I'm guessing you got the code from http://nsis.sourceforge.net/archive/...b.php?page=111
Have you used !include WinMessages.nsh?
-Stu
grahama
9th November 2004 20:10 UTC
aha!
let me try that
the stupid QuicktimeFullInstaller.exe launches its parent directory upon completion....so I have to close it myself
not a very silent install...
many thanks :)
grahama
10th November 2004 00:14 UTC
tried this in my installer:
;put in my includes
!include WinMessages.nsh
;put in the last function called
System::Call 'user32::PostMessageA(i,i,i,i) i($TEMP,${WM_CLOSE},0,0)'
Afrow UK
10th November 2004 12:48 UTC
What is $TEMP doing in there? I know you are probably just trying to get it to work, but that would be completely pointless. $TEMP is the path to the Temp folder on the user's system. You pass the Window handle ($0) for a reason.
I shall have a go at it myself.
-Stu
Afrow UK
10th November 2004 12:56 UTC
Ok, I found your problem.
You should be searching for the window title not window class...
FindWindow $0 "" "Temp"
IntCmp $0 0 done
IsWindow $0 0 done
System::Call 'user32::PostMessageA(i,i,i,i) i($0,${WM_CLOSE},0,0)'
-Stu
grahama
10th November 2004 19:48 UTC
many many thanks Afrow :) That did the trick.
it is amazing how unprofessional the apple quicktime installer is. Kind of sad. Thing does not even delete the main registry when you uninstall it...