-1

Sometimes AutoCAD 2009 spoils own menu files and some settings. At this case I recover the application state through the deleting its registry key in HKCU and its folders in the current user profile. Now I am to install necessary components (they recreate the registry key in HKCU and folders). For this purpose I programmatically launch the application. But I want to kill the process when the necessary components will be installed complettely during the application starting (because AutoCAD launching takes many time).

If I kill the acad.exe process, then the components installing will be killed too. I dont need such behaviour.

Is it possible to define (programmatically, I use C#) the moment when the installing of these components was finished? Or maybe it is possible to define that some components of the application are not installed on the current user profile still and then to force the launching of these components installing without the application launching (I don't know how to do it).

enter image description here

Andrey Bushman
  • 11,712
  • 17
  • 87
  • 182
  • Capture exit codes of the installation package, and if not 0, do (something) to report it or retry? ala [this](http://stackoverflow.com/questions/1585354/get-return-value-from-process) similar question, may be of assistance. – gravity Jul 06 '16 at 14:24
  • I don't understand you. This is not installing. This is the usual launching the application. When it happens first time, the absent components will be installed. So, it is not `msi`-file launching directly. – Andrey Bushman Jul 06 '16 at 14:28
  • So, you're wanting to monitor (but not start) these additional components' installation packages, and wait for their completion? – gravity Jul 06 '16 at 14:29
  • I added "UPD" section. Read this, please. – Andrey Bushman Jul 06 '16 at 14:42
  • I think some clarification, on how you want the `c#` application to : 1. launch (when does it run), and also 2. handle the component installation (does it cancel? retry? reset registry keys?)... right now, it's not clear what your expectations are. – gravity Jul 06 '16 at 16:25

1 Answers1

1

If you delete files or registry entries from the installed product, it's a feature of Windows Installer that it repairs the install at certain trigger points, one of which is using an advertised shortcut. If you don't want that application to actually run and want only the repair, then an alternative is to go to Programs and Features, select the product and Repair it. Or right click the MSI file and choose repair.

PhilDW
  • 20,260
  • 1
  • 18
  • 28