ביטול והפעלת סרביסים בכתיבת סקריפט - Windows - HWzone פורומים
עבור לתוכן
  • צור חשבון

ביטול והפעלת סרביסים בכתיבת סקריפט


assaf990

Recommended Posts

אני מעוניין להתקין ad-adware

הבעייה שהוא דורש תמיד הפעלת סרביס ואני לא רוצה אותו שירוץ תמיד

האם ניתן לכתוב קובץ סקריפט:

הפעלת הסרביסים שנחוצים לתוכנה

הפעלת התוכנה

כיבוי הסרביסים בעת סגירת התוכנה

כיצד?

קישור לתוכן
שתף באתרים אחרים

בקובץ batch ע"י net stop/start:

net start SERVICENAME
net stop SERVICENAME

או ע"י sc

DESCRIPTION:
Starts a service running.
USAGE:
sc <server> start [service name] <arg1> <arg2> ...

DESCRIPTION:
Sends a STOP control request to a service.
USAGE:
sc <server> stop [service name] <reason> <comment>
<reason> = Optional reason code number for service stop
formed with the following elements in the format:

Flag:Major reason:Minor reason

[E.g., 1:2:8 means Hardware: Disk (Unplanned)]

Flag Major reason
------------------ ---------------------------
1 - Unplanned 1 - Other
2 - Custom 2 - Hardware
4 - Planned 3 - Operating System
4 - Software
5 - Application
64-255 - Custom

Minor reason
-----------------------------------
1 - Other
2 - Maintenance
3 - Installation
4 - Upgrade
5 - Reconfiguration
6 - Hung
7 - Unstable
8 - Disk
9 - Network Card
10 - Environment
11 - Hardware Driver
12 - Other Driver
13 - Service Pack
14 - Software Update
15 - Security Fix
16 - Security
17 - Network Connectivity
18 - WMI
19 - Service Pack Uninstall
20 - Software Update Uninstall
22 - Security Fix Uninstall
23 - MMC
256-65535 - Custom

<comment> = Optional comment for the reason above (127 characters maximum
)

קישור לתוכן
שתף באתרים אחרים

1) ע"י הפעלת הקובץ עצמו? c:\...\...\setup.exe

2) תחפש תוכנות wait ברשת. תשלח להן שם חלון שנפתח ועד שהוא נסגר התוכנית הראשית לא רצה.

סעיף 2 נשמע מסובך

אפשר אולי לעשות sleep לאיזה שעה בפקודה פשוטה בסקריפט?

קישור לתוכן
שתף באתרים אחרים

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

×
  • צור חדש...