You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

18 lines
479 B

@echo off
cls
NET FILE 1>NUL 2>NUL
if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges )
:getPrivileges
echo You have no admin rights! You need to start your CMD in admin mode to install the windows service
goto end
:gotPrivileges
set current=%~dp0
set bin="%current%src\AbpWindowsService\bin\Debug\net5.0\AbpWindowsService.exe"
echo Creating service with the name "AbpWindowsService"
sc create "AbpWindowsService" binPath=%bin%
:end
pause