There is a sample Visual Studio Solution for a .Net Framework C# Windows Service that also includes Visual Studio Installer projects. Although the sample is old it can be updated and does not require you to write custom actions for a successful service install. The sample can be obtained from the msdn code gallery at https://github.com/microsoftarchive/msdn-code-gallery-microsoft/tree/master/OneCodeTeam/A%20basic%20Windows%20service%20in%20C%23%20(CSWindowsService)
visual studio setup project windows service install error
Hi
In my visual studio setup project, ive added a windows service (inside applicationFolder\Service directory) which want to install during installation process. to do this, i've created an installService.bat batch file which contains the following commands :
@echo off
sc create "Houshmand Configuration Manager Service" binpath= "%~dp0Service\Houshmand.ConfigManager.Service.exe" start= delayed-auto
net start "Houshmand Configuration Manager Service"
to run this commands, i've add cmd.exe from windows directory into my setup project aplicationFolder directory and in custom action add it in commit node, then set the following command in arguments :
/k "installService.bat"
but when i build and run my setup project, facing this message during installation service and when i close the message, my setup process being rolled back!!!
DNS server not authoritative for zone. Not enough memory resources are available to process this command.
But when i execute the given batch file (installService.bat) as administrator manually, it works correctly!!!
where is the problem and how to solve it?
Thanks in advance
Visual Studio
Visual Studio Setup
2 answers
Sort by: Most helpful
-
-
Hamed Vaziri 136 Reputation points
2023-08-21T16:31:43.6733333+00:00