Archive: close a directory


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


I'm guessing you got the code from http://nsis.sourceforge.net/archive/...b.php?page=111

Have you used !include WinMessages.nsh?

-Stu


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 :)


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)'


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


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

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...