Old 6th October 2010, 13:54   #1
mj_blue
Junior Member
 
Join Date: Sep 2007
Posts: 13
Add Custom not working?

Hi, I am making an enhancement to our installer to change the horrible "MCI-Command Handling Window" holding open an activex control to be a more sensible message but I can't get the AddCustom work.

I have tried using the example LockedListCustom.nsi and this builds but when I say 'Yes' to the question is myapp running it never show sin the lockedlist window. I get the same behaviour in my own installer.

Details:

lockedlist V2.0
OS: XP SP3
NSIS: 2.46


code:

Function Isocxlocked
LockedList::IsFileLocked $INSTDIR\axagp.ocx
Pop $R1
${If} $R1 == true
MessageBox MB_OK|MB_ICONINFORMATION `$INSTDIR\axagp.ocx IS locked!!??`
${Else}
MessageBox MB_OK|MB_ICONINFORMATION `$INSTDIR\axagp.ocx is not locked.`
${EndIf}
Push true

FunctionEnd

Function MyAppCallback
Pop $R0

; Message box instead of actual logical test...
${If} ${Cmd} `MessageBox MB_YESNO|MB_ICONQUESTION 'Is $R0 running?' IDYES`
Push true
${Else}
Push false
${EndIf}

FunctionEnd

Function LockedListShow
!insertmacro MUI_HEADER_TEXT `List of open Browsers with myapp in Use` ``
GetFunctionAddress $R1 Isocxlocked
LockedList::AddCustom /icon $INSTDIR\antixgpb.exe 'Internet Explorer' iexplore.exe $R1
GetFunctionAddress $R0 MyAppCallback
LockedList::AddCustom /icon $PLUGINSDIR\myapp.ico `My App v1.0` myapp.exe $R0
LockedList::Dialog /searching "Searching for Browsers in use" /noprograms "No Browsers have Game Player in use" /autoclose
FunctionEnd



I have this running twice in the code above, once detecting if the file is in use (and currently forcing a true return) and once is extracted straight from the demo app.

Any help with how to get this working appreciated.

Thanks

Mark Jones

Last edited by mj_blue; 6th October 2010 at 13:57. Reason: no smiley
mj_blue is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
handle, plug-in

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump