Problem with window maintenance

I made a Windows service and add the installer.in program, which contains only this code. System.Diagnostics.Process.Start (@ "C: \ Windows \ system32 \ notepad.exe"); inside a timer event and an interval of 60 seconds. I just wanted to try starting the Windows service.

1st-serviceProcessInstaller1, I changed the setting of my account as local. 2nd-serviceInstaller1, in this case I changed its startup type to automatic. then I create a setting, add another project, then right-click, and then add the output file, then click OK. then right-click on project-> view-> custom Action-> right-click Install-> Add custom Action-> select the application folder and add the main output. The same is done for all other parameters, such as commit, rollback, delete.

after that I build the installation that he builds successfully, then I install the installation that he installed correctly in the program file. n create one .exe file n one Instalfile. but the problem is that when I search for a service in "services.msc" the service is not there. means the service does not show there.i tried, but did not get ans.plz help me solve this problem.

+3
source share
3 answers

I suggest trying to install the assembly manually to see if there was any error message. Just open the Visual Studio command prompt and run InstallUtil.exe [YourService].exe. At least you will find out if it is installed correctly.

0
source

Not the answer to your original question, but

  • - (tm)
  • , ..Net 3 , ( , iirc)

: installutil ( )? , , "C:\Windows\Microsoft.NET\Framework\v2.0.50727".

+2

Better yet, use the sc.exe command line tool. Try "sc create /?" at the command prompt and see its parameters. Then you can use "sc start", "sc stop" and "sc query" to control the service. You can use sc.exe to send a custom command to the service. Check the Windows event log for errors related to installing the service. This may be the .Net version used to create it, not on the target machine.

0
source

Source: https://habr.com/ru/post/1739721/


All Articles