C# visual MSI Installer cannot find InstallState when using custom action with parameters visual studio setup project custom action after install (5). Open the Microsoft Management Console (Start, Run, MMC)). When it opens, pick the Services and EventViewer snap-ins. Under Services, you should easily find the ArcaneTimeLogger, just double click on it and start it. Once it starts you can close the dialog.
Re: Could not find Installstate
Dec 01, 2016 08:25 PM|navyjax2|LINK
Actually, the way I have my project set up, I use the Install phase and have no override for the Commit phase, so I do not believe that is accurate.
For each of the phases, in the Custom Actions section, I right-click and select Add > Add Custom Action... then select Application Folder in the dialog, then 'Primary output from MyApp (Active)'.
For each of the phases, when I select 'Primary output from MyApp (Active)', my InstallerClass property is True (I've seen other posts saying to change this to False - it is not necessary).
For the Install phase, you select 'Primary output from MyApp (Active)' and that is when you can set your CustomActionData string variables that you are gathering from dialog forms. For me, I added Textboxes A and B forms in the User Interface section. On A, I had one textbox, EDITA1. It was for the path of a file, so the variable is 'filepath'. On B, I had 2 boxes, EDITB1 and EDITB2. These were assigned variables 'host' and 'port', as they were for some database information for my app to connect to upon installation.
I ran into the error you did because I had left off a closing quote on one of the textboxes, with one error before it complaining it couldn't load a file or assembly from ///file:C:WindowsSYSWOW64Files - without telling me what the file or assembly was. Once I fixed the quote issue and re-built the Setup Project, it installed fine.
So for the installer class, you really only need to override the Install method. The rest will do what they would always do. It is only during Install that you would grab the parameters and do something with them, for ex.: