Just tried to run an application via the following:
I have browsed to
Add this in windows Environmental variables
First: Right click on My computer or This PC
Second: Click on Environmental Variables
Third: add this path after clicking on path
C:\Windows\Microsoft.NET\Framework\v4.0.30319\installutil.exe
Just add the installUtil.exe
path in the environment variable to fix this issue.
Example:
C:\Windows\Microsoft.NET\Framework\v4.0.30319
Before Installing service using command line...
use 2 steps:
This might have occurred because you would not have opened the Command Prompt as an administrator or with Administrative Privileges.
I got this after I had went back to 2015 from 2017 and I was still using the 2017 command prompt. Something to check.
Found a solution on bytes.com
The code to install a service:
@ECHO Installing Service...
@SET PATH=%PATH%;C:\Windows\Microsoft.NET\Framework\v4.0.30319\
@InstallUtil C:\Unlock_4_Service\bin\Debug\Unlock_4_Service.exe
@ECHO Install Done.
@pause
@InstallUtil <.exe file path of your windows service>
Code to uninstall the service
@ECHO Installing Service...
@SET PATH=%PATH%;C:\Windows\Microsoft.NET\Framework\v4.0.30319\
@InstallUtil /u C:\Unlock_4_Service\bin\Debug\Unlock_4_Service.exe
@ECHO Uninstall Done.
@pause
@InstallUtil /u <.exe file path of your windows service >
Save the 2 files as service_install.bat and service_uninstall.bat
Run the files as administrator, every time you have to install or uninstall the service.