„Windows Server 2003“: sukurkite paslaugą
Programas galima sukurti kaip „Windows Server 2003“ paslaugas, kad jos būtų vykdomos visam laikui ir kiekvieną kartą paleidžiant sistemą. Tai veikia net vartotojui neprisijungus. Šiame praktiniame patarime galite perskaityti, kaip nustatyti programą.
„Windows Server 2003“: sukurkite paslaugą naudodamiesi išteklių rinkinio įrankiais
Tai gana lengva naudojant „Windows Server 2003“ išteklių rinkinio įrankius, kuriuos galite atsisiųsti iš CHIP: „Resource Kit Tools Download“.
- Įdiekite rinkinio įrankius ir, žinoma, programą, kuri bus nustatyta kaip paslauga. Užrašykite visą kelią į programos * .exe failą.
- Paleiskite komandinę eilutę (CMD) „Kit Tools“ diegimo aplanke. Čia įveskite šią komandą: instsrv.exe [paslaugos pavadinimas] [kelias į programą] \ srvany.exe, pavyzdžiui, instsrv.exe MeinDienst C: \ Program \ MeinDienst.exe \ srvany.exe ir užbaikite su „Enter“.,
- „Windows“ + „R“ atidarykite vykdymo langą, įveskite regedit.exe ir spustelėkite Gerai. Dabar ieškokite rakto registre: HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ [jūsų paslaugos pavadinimas]. Dabar sukurkite naują antrinį raktą pavadinimu „Parameters“. Suteikite jai reikšmę: Vardas: Programos duomenų tipas: Eilutė (REG_SZ) Reikšmė: [Kelias į * .exe] Dabar uždarykite registro rengyklę.
- Dabar paslauga sukurta ir paleidžiama automatiškai. Norėdami atlikti pakeitimus, atidarykite valdymo skydelį, tada „Administravimo įrankiai“ ir galiausiai „Paslaugos“. Čia taip pat rasite sukurtą paslaugą, kuria galite atlikti bet kokius nustatymus.
Galingas įrankis: „SC.exe“, skirtas daugybei paslaugų parametrų
Naudodamiesi šia programa, kurią taip pat galite modifikuoti naudodamiesi „Windows Server 2003“ išteklių rinkinio įrankiais, naudodamiesi komandų eilute, galite visiškai sukurti, redaguoti ir ištrinti paslaugas. Tai veikia taip.
- Dar kartą atidarykite komandinę eilutę paleisdami „Run“ („Windows“ + „R“) cmd.exe.
- Sukurkite paslaugą: sc sukurkite „MeinDienst“ start = auto binpath = „C: \ Program \ MeinDienst.exe“
- Konfigūruokite paslaugą taip, kad ji neprasidėtų automatiškai: sc config „Mano paslauga“ start = išjungta
- Pakeiskite paslaugos aprašą: sc aprašymas "MeinDienst" "Ši programa paleista kaip paslauga ir visada aktyvi."
Apskritai atkreipkite dėmesį į erdves, nes tai sukelia sunkumų, ypač nurodant kelią. Jei įmanoma, venkite jų visiškai pavadinimuose. Jei nenorite dirbti su komandine eilute, peržiūrėkite vieną iš mūsų „Windows“ konsolės alternatyvų.