註冊Windows service及其相關

註冊Windows service,.net寫的c++

net stop "xxxxxx"
"%SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe" /u aaaaa.exeweb

"%SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe" aaaaa.exe
net start "xxxxxx"spa

 

xxxxxx是在services管理界面裏看到的名字.net

 ==============================orm

c++寫的ci

sc delete xxxxit

=================================io

今天我用clr寫了一個service,試圖用InstallUtil.exe註冊,本身沒有意識到table

 

老是獲得這個錯誤form

Exception occurred while initializing the installation:

System.IO.FileLoadException: Attempt to load an unverifiable executable with fixups (IAT with more than 2 sections or a TLS section.) (Exception from HRESULT: 0

x80131019).

後來又用servicename.exe -install

午餐後腦子很很差使

後來用這個

sc create RemoteExe binpath="C:\MyTestCode\RemoteExe\Debug\RemoteExeService.exe"

還不行

最後是少個空格

sc create RemoteExe binpath= "C:\MyTestCode\RemoteExe\Debug\RemoteExeService.exe"

 

binpath=以後要有一個空格

真變態

相關文章
相關標籤/搜索