Windows server 2003: buat layanan
Program dapat dibuat sebagai layanan di bawah Windows Server 2003 sehingga dijalankan secara permanen dan setiap kali sistem dimulai. Ini bahkan berfungsi tanpa pengguna masuk. Anda dapat membaca tentang cara mengatur aplikasi di tip praktis ini.
Windows Server 2003: Buat layanan menggunakan Resource Kit Tools
Ini relatif mudah dengan Windows Server 2003 Resource Kit Tools, yang dapat Anda unduh di sini dari CHIP: Download Resource Kit Tools.
- Instal alat kit dan tentu saja program yang akan diatur sebagai layanan. Catat jalur lengkap ke file * .exe program.
- Mulai baris perintah (CMD) di folder instalasi Alat Kit. Masukkan perintah berikut di sana: instsrv.exe [nama layanan] [path ke aplikasi] \ srvany.exe, misalnya instsrv.exe MeinDienst C: \ Program \ MeinDienst.exe \ srvany.exe dan akhiri dengan "Enter" .
- Dengan "Windows" + "R" membuka jendela jalankan, masukkan regedit.exe dan klik Ok. Sekarang cari kunci dalam registri: HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ [nama layanan Anda]. Sekarang buat subkunci baru yang disebut "Parameter". Beri nilai: Nama: Jenis data Aplikasi: String (REG_SZ) Nilai: [Path ke * .exe] Sekarang tutup editor registri.
- Layanan sekarang dibuat dan mulai secara otomatis. Untuk melakukan perubahan, buka Panel Kontrol, lalu "Alat Administratif" dan akhirnya "Layanan". Di sana Anda juga akan menemukan layanan yang Anda buat, di mana Anda dapat membuat pengaturan apa pun.
Alat yang ampuh: SC.exe untuk berbagai pengaturan layanan
Dengan program ini, yang juga dapat Anda retrofit melalui Alat Kit Sumber Daya Windows Server 2003, Anda dapat membuat, mengedit, dan menghapus layanan sepenuhnya melalui baris perintah. Ini berfungsi seperti ini.
- Buka baris perintah lagi dengan memulai Jalankan ("Windows" + "R") cmd.exe.
- Buat layanan: sc buat "MeinDienst" start = auto binpath = "C: \ Program \ MeinDienst.exe"
- Konfigurasikan layanan agar tidak mulai secara otomatis: sc config "Layanan saya" mulai = dinonaktifkan
- Ubah deskripsi layanan: sc description "MeinDienst" "Program ini dimulai sebagai layanan dan selalu aktif."
Secara umum, perhatikan spasi, karena ini menyebabkan kesulitan, terutama ketika menentukan jalan. Jika mungkin, hindari ini sepenuhnya dalam nama-nama. Jika Anda tidak ingin bekerja dengan baris perintah, lihat salah satu alternatif konsol Windows kami.