ipab
5th June 2005 08:05 UTC
Proofread, fix and streamline
i need your help guys, i am trying to streal line, structure and otherwise clean up some of my script code and i need your help.
One thing that i realli need help with is that add/remove freezes after i uninstall using the add/remove panel since i use 'exec' to execute a file.
It becomes normal once i close the prog. o please that is something i realli need help with. The rest i would like fo ur guys to help me clean up. thanks ipab
ipab
8th June 2005 06:37 UTC
anyone :s, plz i realli need assistance
RobGrant
8th June 2005 09:14 UTC
Use ExecWait if you want to run something in the background.
ipab
10th June 2005 04:26 UTC
that only waits for and and thus it doesnt exit the installer, i want the installer to exit as soon as it finishes launching msn messenger
Afrow UK
10th June 2005 14:44 UTC
This code is logically wrong:
loop:
KillProcDLL::KillProc "msnmsgr.exe"
IntCmp $R0 603 exit
Goto loop
exit:
Here you're only exiting (jumping to exit) if msnmsgr.exe could not be terminated. Read the KillProcDLL readme. KillProcDLL returns 0 if the process was successfully terminated and 603 if it wasn't.
On another note, using KillProcDLL is a bad (and last resort) way to kill programs. You should either close them by sending WM_CLOSE with SendMessage, or prompt the user to close it manually:
FindWindow $R0 "" "MSN Messenger"
IsWindow $R0 0 +3
MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION "Please close MSN Messenger before continuing!" IDRETRY -2
Abort
-Stu
ipab
10th June 2005 16:10 UTC
loop:
KillProcDLL::KillProc "msnmsgr.exe"
IntCmp $R0 603 exit
Goto loop
exit:
i want it that way, since there are several processes named msnmsgr.exe and thus i want to kill all of them
Afrow UK
10th June 2005 16:53 UTC
Yes but take a look and follow the code through:
Begin loop
Attempt to kill msnmsgr.exe
If failed exit
Else loop
I think what you want is:
Begin loop
Attempt to kill msnmsgr.exe
If failed loop
Else exit
-Stu
Afrow UK
10th June 2005 16:54 UTC
Simplified:
loop:
KillProcDLL::KillProc "msnmsgr.exe"
IntCmp $R0 0 loop
-Stu
ipab
12th June 2005 01:22 UTC
installer
here is an installer made with your improved kill code.
can u please take a look at the uninstaller part (install using the installer)and then uninstall using add/remove programs. I think that you will more clearly understand my dilemma.
http://www.mad-skinning.net/skins/?page=mad
ipab
23rd June 2005 22:15 UTC
please delete this, it was by accident.