I have an windows service running that updates another windows service. It does this by uninstalling the currentversion and then installing the newer one. We do this using the original msi installers and msiexec with Process.Start().
Process msiexec = new Process();
msiexec.StartInfo.FileName = "msiexec";
msiexec.StartInfo.Arguments = "/quiet /i \"" + msiFileName + "\" /l*v \"" + msilogfile + "\"";
if (!msiexec.Start())
....etc... error handling code and such...
Uninstalling goes fine, so thats no problem. Installing, seems to go fine as well. I output the msi install log. And in the log, it says it succesfully installed.
I then reboot the computer, and on startup, Windows itself runs the installer again? It then complains that the service already exists of course and it all breaks...
What could be the reason that Windows decides to run the installer at startup?
Important to note here: If I manually install the new version, it works and windows does not try to install it on startup. So it has to do with msiexec maybe? Some permission thing?
PendingFileRenameOperationsvalue under theHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Managerkey after your next test to see if there are any entries. I would suspect that the entire install is not being completed when using the service, so the MSI is accessed again by the OS after the reboot to finish the job. - slugster