Windows server 2003: izveidojiet pakalpojumu
Programmas var izveidot kā pakalpojumus operētājsistēmā Windows Server 2003, lai tās tiktu izpildītas pastāvīgi un katru reizi, kad sistēma tiek palaista. Tas darbojas pat bez lietotāja pieteikšanās. Par to, kā iestatīt lietojumprogrammu, varat lasīt šajā praktiskajā padomā.
Windows Server 2003: izveidojiet pakalpojumu, izmantojot Resursu komplekta rīkus
Tas ir samērā viegli, izmantojot Windows Server 2003 Resource Kit Tools, ko šeit var lejupielādēt no CHIP: Resource Kit Tools Download.
- Instalējiet komplekta rīkus un, protams, programmu, kas jāiestata kā pakalpojums. Pierakstiet visu ceļu uz programmas * .exe failu.
- Sāciet komandrindu (CMD) komplekta Tools instalācijas mapē. Tur ievadiet šādu komandu: instsrv.exe [pakalpojuma nosaukums] [ceļš uz lietojumprogrammu] \ srvany.exe, piemēram, instsrv.exe MeinDienst C: \ Program \ MeinDienst.exe \ srvany.exe un noslēdziet ar “Enter”.,
- Ar "Windows" + "R" atveriet palaišanas logu, ievadiet regedit.exe un noklikšķiniet uz Labi. Tagad meklējiet reģistrā atslēgu: HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ [jūsu pakalpojuma nosaukums]. Tagad izveidojiet jaunu apakšatslēgu ar nosaukumu “Parameters”. Piešķiriet tam vērtību: Nosaukums: Lietojumprogrammas datu tips: virkne (REG_SZ) Vērtība: [Ceļš uz * .exe] Tagad aizveriet reģistra redaktoru.
- Pakalpojums tagad ir izveidots un sākas automātiski. Lai veiktu izmaiņas, atveriet vadības paneli, pēc tam “Administratīvie rīki” un visbeidzot “Pakalpojumi”. Tur jūs atradīsit arī izveidoto pakalpojumu, ar kuru jūs varat veikt jebkurus iestatījumus.
Spēcīgs rīks: SC.exe daudziem pakalpojumu iestatījumiem
Izmantojot šo programmu, kuru var arī modificēt, izmantojot Windows Server 2003 Resursu komplekta rīkus, jūs varat pilnībā izveidot, rediģēt un izdzēst pakalpojumus, izmantojot komandrindu. Tas darbojas šādi.
- Atkal atveriet komandrindu, palaižot Run ("Windows" + "R") cmd.exe.
- Izveidojiet pakalpojumu: sc izveidot "MeinDienst" start = auto binpath = "C: \ Program \ MeinDienst.exe"
- Konfigurējiet pakalpojumu tā, lai tas nesākas automātiski: sc config "Mans pakalpojums" start = atspējots
- Mainiet pakalpojuma aprakstu: sc apraksts "MeinDienst" "Šī programma tiek palaista kā pakalpojums un vienmēr ir aktīva."
Parasti pievērsiet uzmanību atstarpēm, jo tās rada grūtības, it īpaši, norādot ceļu. Ja iespējams, no nosaukumiem pilnībā izvairieties. Ja nevēlaties strādāt ar komandrindu, apskatiet kādu no mūsu Windows konsoles alternatīvām.