The service must be installed before it can be executed.
Service installation and uninstallation of the service executable "Installutil.exe" "installutil.exe/u" as the last parameter.
For example, "Installutil.exe D:\webcamservice.exe" will install Service Manager for services.
Open a command window as an administrator (do not use traditional cmd mode to open a normal DOS window) by starting with Visual Studio 2015-vs2015 x86 native Tools command Prompt in the following order:
Enter the created Service application directory (typically under Bin\Debug) and enter the command: Installutil.exe Webcamservice.exe If the installation is successful, the command prompt is displayed directly, there is no information, and if the installation is unsuccessful, a message appears (the installation is not successful, as discussed below);
Right-click on "My Computer-admin-(left column) services and applications-services", you can find the service "Webcamservice", the service is just installed, and does not start, double-click the service to open the Properties window, click Start to
1 c:\windows\system32>installutil.exe C:\Users\llskj\Desktop\Samples\Misc\DxWebCam\Service\bin\ Release\webcamservice.exe24.6. 1586.0 3 Copyright (C) Microsoft Corporation. All rights reserved. 456 A transacted installation is running. 78 The installation phase of the installation is starting.
1 The installation phase of the installation is beginning. 2 View the contents of the log file to get the progress of the C:\Users\llskj\Desktop\Samples\Misc\DxWebCam\Service\bin\Release\WebCamService.exe assembly. 3 the file is located in C:\Users\llskj\Desktop\Samples\Misc\DxWebCam\Service\bin\Release\WebCamService.InstallLog. 4 Installing assembly "C:\Users\llskj\Desktop\Samples\Misc\DxWebCam\Service\bin\Release\WebCamService.exe". 5 the parameters that are affected are:6LogtoConsole =7LogFile =C:\Users\llskj\Desktop\Samples\Misc\DxWebCam\Service\bin\Release\WebCamService.InstallLog8AssemblyPath =C:\Users\llskj\Desktop\Samples\Misc\DxWebCam\Service\bin\Release\WebCamService.exe9 Installing service Webcamservice ...Ten The service Webcamservice has been successfully installed. One creating EventLog source Webcamservice in log application ... A - the Install phase has completed successfully and the commit phase is beginning. - View the contents of the log file to get the progress of the C:\Users\llskj\Desktop\Samples\Misc\DxWebCam\Service\bin\Release\WebCamService.exe assembly. the the file is located in C:\Users\llskj\Desktop\Samples\Misc\DxWebCam\Service\bin\Release\WebCamService.InstallLog. - submitting assembly "C:\Users\llskj\Desktop\Samples\Misc\DxWebCam\Service\bin\Release\WebCamService.exe". - the parameters that are affected are: -LogtoConsole = +LogFile =C:\Users\llskj\Desktop\Samples\Misc\DxWebCam\Service\bin\Release\WebCamService.InstallLog -AssemblyPath =C:\Users\llskj\Desktop\Samples\Misc\DxWebCam\Service\bin\Release\WebCamService.exe + A the commit phase has completed successfully. at - The transaction installation has completed. - -C:\windows\system32>
Installing InstallUtil for Windows systems