B?ng cch s? d?ng Sc.exe v Netsvc.exe v?i cc d?ch v? i?u khi?n t? xa

D?ch tiu ? D?ch tiu ?
ID c?a bi: 166819 - Xem s?n ph?m m bi ny p d?ng vo.
Bung t?t c? | Thu g?n t?t c?

TM T?T

Windows NT Server 4.0 Resource Kit b? sung 1, i km v?i hai m?i hnh chnh ti?n ch ? lm vi?c t? xa v?i d?ch v? Windows NT.

Cc ti?n ch m?i l:
  • SC.exe: Cng c? ny cung c?p m?t cch ? giao ti?p v?i b? i?u khi?n d?ch v? (Services.exe) t? d?u nh?c l?nh, ? l?y thng tin v? d?ch v?.
  • Netsvc.exe: Cng c? ny cung c?p m?t cch ? t? xa b?t ?u, d?ng v truy v?n tr?ng thi c?a d?ch v? t? d?ng l?nh.

THNG TIN THM

N c th? s? d?ng Sc.exe v Netsvc.exe ? chuy?n ?i gi tr? b?t ?u c?a m?t d?ch v?, v ? t? xa b?t ?u v ng?ng m?t d?ch v?.

B?ng cch s? d?ng cc ngu?n ti nguyn kit ti?n ch cung c?p kh? nng ? th?c hi?n cc c quan ng k? thay ?i v ?m b?o r?ng s? thay ?i ng k? v?i cc d?ch v? B? i?u khi?n. B? i?u khi?n d?ch v? c s? d? li?u ?c C?p Nh?t t? ?ng khi s? d?ng cc ti?n ch, cho php b?n thay ?i b?t ?u cc gi tr? v d?ng l?i v kh?i ?ng l?i d?ch v? t? xa. N?u khng, t? xa S?a ?i ? ng k? s? yu c?u b?n ph?i kh?i ?ng l?i t? xa my tnh ho?c lm cho s? thay ?i trong cng c? d?ch v? trong Control Panel v cc my tnh t? xa.

Cho m?t l?i gi?i thch chi ti?t lm vi?c c?a d?ch v? b? i?u khi?n, v b? API ?c s? d?ng, tham kh?o ? ki?n cc Windows NT 4.0 Device Driver Kit (DDK), v Windows NT 4.0 pht tri?n ph?n m?m Kit (SDK).

M?t v d? v? lm th? no ? t? xa thay ?i gi tr? b?t ?u c?a l?ch tr?nh d?ch v? ? v hi?u ha, ki?m tra n cho cc ty ch?n v hi?u ho, ?t l?i h?ng d?n s? d?ng, v sau b?t ?u cc d?ch v? sau.

Trong v d? ny, my tnh ang ch?y cc l?nh l MYMACHINE. My tnh t? xa l REMOTE1. Quy?n qu?n tr? ?c yu c?u ph?i th?c hi?n cc l?nh sau trn my tnh t? xa:
C:\>SC \\REMOTE1 config l?ch tr?nh b?t ?u = tn t?t
[SC] ChangeServiceConfig thnh cng

C:\>netsvc/b?t ?u \\REMOTE1 "L?ch tr?nh"
M? l?i 1058

C:\net helpmsg 1058

Cc d?ch v? ?c ch? ?nh v hi?u ho v khng th? kh?i ?ng.
C:\>SC \\REMOTE1 config l?ch tr?nh b?t ?u = nhu c?u [SC] ChangeServiceConfig thnh cng

C:\>netsvc/b?t ?u \\REMOTE1 "L?ch tr?nh" D?ch v? ang ch? b?t ?u ngy \\REMOTE1

C:\>SC \\REMOTE1 qc Schedule [SC] GetServiceConfig thnh cng
   SERVICE_NAME: Schedule
      TYPE               : 10  WIN32_OWN_PROCESS
      START_TYPE         : 3   DEMAND_START
      ERROR_CONTROL      : 1   NORMAL
      BINARY_PATH_NAME   : C:\WINNT\System32\AtSvc.Exe
      LOAD_ORDER_GROUP   :
      TAG                : 0
      DISPLAY_NAME       : Schedule
      DEPENDENCIES       :
      SERVICE_START_NAME : LocalSystem
				

B?n c th? t? ?ng ho cc v d? tr?c thng qua m?t t?p tin th?c thi.

Tham kh?o ? ki?n cc Windows NT Server 4.0 Resource Kit, b? sung 1, cho thng tin b? sung v? c php v s? d?ng cc Sc.exe v Netsvc.exe.

Thu?c tnh

ID c?a bi: 166819 - L?n xem xt sau cng: 19 Thang Tam 2011 - Xem xt l?i: 2.0
p d?ng
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional Edition
  • Microsoft Windows NT Workstation 4.0 Developer Edition
  • Microsoft Windows NT Server 4.0 Standard Edition
T? kha:
kbinfo kbsetup kbmt KB166819 KbMtvi
My d?ch
QUAN TRONG: Bi vi?t ny ?c d?ch b?ng ph?n m?m d?ch my c?a Microsoft ch? khng ph?i do con ng?i d?ch. Microsoft cung c?p cc bi vi?t do con ng?i d?ch v c? cc bi vi?t do my d?ch ? b?n c th? truy c?p vo t?t c? cc bi vi?t trong C s? Ki?n th?c c?a chng ti b?ng ngn ng? c?a b?n. Tuy nhin, bi vi?t do my d?ch khng ph?i lc no c?ng hon h?o. Lo?i bi vi?t ny c th? ch?a cc sai st v? t? v?ng, c php ho?c ng? php, gi?ng nh m?t ng?i n?c ngoi c th? m?c sai st khi ni ngn ng? c?a b?n. Microsoft khng ch?u trch nhi?m v? b?t k? s? thi?u chnh xc, sai st ho?c thi?t h?i no do vi?c d?ch sai n?i dung ho?c do ho?t ?ng s? d?ng c?a khch hng gy ra. Microsoft c?ng th?ng xuyn c?p nh?t ph?n m?m d?ch my ny.
Nh?p chu?t vo y ? xem b?n ti?ng Anh c?a bi vi?t ny:166819

Cung cp Phan hi

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com