taskkill /IM “Tomcat8.exe” /T /F
ping -n 6 127.0.0.1 > nul
net start “Tomcat8”
Tag: WINDOWS SERVICE
C# Windows Get Assembly Path
Wİndows service ‘de exenin bulundugu yere bazen ulaşmada sıkıntı olabiliyor. (windows klasorunu görüyor servisler bazen) . Örnek exe klasorunde dosyaya erişimde yaşanan sıkıntı ….
string pathofService = System.IO.Path.GetDirectoryName(new System.Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase).LocalPath)+@"\";
/*or*/
string pathofService = AppDomain.CurrentDomain.BaseDirectory ++@"\";
VS 2017 WINDOWS SERVICE PROJECT SETUP
- Right click on the setup project in your Solution Explorer.
- Select View > Custom Actions. (In VS2008 it might be View > Editor > Custom Actions)
- Right-click on the Install action in the Custom Actions tree and select ‘Add Custom Action…’
- In the “Select Item in Project” dialog, select Application Folder and click OK.
- Click OK to select “Primary output from…” option. A new node should be created.
- Repeat steps 4 – 5 for commit, rollback and uninstall actions.
RESPONDINGE DUSEN WINDOWS SERVICE DURDURMA
Cmd yönetici olarak çalıştırılır.
komut satırına: sc queryex servisismi

ve komut satırına tekrar taskkill /pid pidnumarasi /f

task managerde birden çok olan taskları durdurma : taskkill /f /im “LOBJECTS.exe”