Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Terminate A Process


4 replies to this topic

JohnWu

JohnWu
  • Full Members
  • 25 posts

Posted 27 October 2003 - 17:33

Hi, everyone. I'm currently using the InstallShield Developer 7 Standard Project Type to do a project that uninstalls an installed program. However during the uninstallation, there's a dialog saying that there's a file being used. Then I found out that there's a process using the file. Would you please tell me how to terminate a process? Thank you.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 27 October 2003 - 17:53

Take a look at the script sample "List and Shut Down Running Applications" here on InstallSite under InstallScript Samples -> External Programs and Shell

JohnWu

JohnWu
  • Full Members
  • 25 posts

Posted 28 October 2003 - 20:29

Hi, Stefan. Thank you for your help. I used the sample script as a reference and made my own codes in my project. However, the installation failed when it got to the GetRunningApp function. In that function, I used the following two statements:

lProcessID = ProcessIDs(Count);
ProcessHandle = OpenProcess(2035711, 1, lProcessID);

instead of one statement in the sample script.

When the installation was executing the statement:
lProcessID = ProcessIDs(Count);
(Count is an integer from 1 to number of process IDs.)
it displayed an error message saying that there was an internal error, error number 0x80040706.

Would you please tell me how I can solve this problem?
Thank you.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 29 October 2003 - 11:17

Only the error number, no text description? Could be a wrong DLL function prototype (e.g. missing calling convention)

JohnWu

JohnWu
  • Full Members
  • 25 posts

Posted 29 October 2003 - 19:18

Hi, Stefan. Thank you for your reply. Yes, there was only an error number, no text description. I'll try to study those functions more to understand more clearly about those functions. Anyway thanks for your help.