Se afișează postările cu eticheta script. Afișați toate postările
Se afișează postările cu eticheta script. Afișați toate postările

miercuri, 9 iunie 2010

Automate Windows XP services management

When are problems and don't want to manually process all Windows XP services, the tool below can be used :

(thx to http://commandwindows.com/sc.htm )
services_automate.bat :

@echo off

set lp=%~dp0

cd %lp%
rem sc [command] [service name] ...
rem interesting is also the "config" command

echo "Starting setting of services to automatic"
for /F "delims= " %%i in (%lp%\services_names.txt) do (
echo "%%i"
sc start %%i
)
echo End
rem pause

(I got it from web, but can't find now the source to mention :( )
services_names.txt :
ALG
AppMgmt
AudioSrv
BITS
Browser
CryptSvc
DcomLaunch
Dhcp
dmadmin
dmserver
Dnscache
ERSvc
Eventlog
EventSystem
IDriverT
IISADMIN
lanmanserver
lanmanworkstation
LmHosts
MDM
MSDTC
MSFtpsvc
napagent
NetDDE
NetDDEdsdm
Netlogon
Netman
NetSvc
Nla
NMSAccess
NtLmSsp
NtmsSvc
ntrtscan
OfcPfwSvc
PlugPlay
PolicyAgent
ProtectedStorage
RasMan
RemoteAccess
RpcLocator
RpcSs
SamSs
Schedule
seclogon
SENS
SharedAccess
ShellHWDetection
SMTPSVC
Spooler
srservice
SSDPSRV
stisvc
TapiSrv
TermService
Themes
tmlisten
TrkWks
upnphost
UPS
VSS
W32Time
W3SVC
WebClient
winmgmt
Wmi
WmiApSrv
wuauserv
WZCSVC

miercuri, 30 septembrie 2009

Sync on Windows

Below is a way to do automatically sync on Windows using a tool and run a script before the Logoff operation.



- Microsoft has a tool called SyncToy (or other one: DirSyncPro)
* create a batch file with :
rem using DirSyncPro
rem Using SyncToy
echo "Starting sync: ">> c:\Sync.txt
date /t >> c:\Sync.txt
time /t >> c:\Sync.txt
"C:\Program Files\SyncToy 2.0\SyncToyCmd.exe" -R
echo "Ended sync: ">> c:\Sync.txt
time /t >> c:\Sync.txt

To run it before logoff:

-http://support.microsoft.com/kb/307882 :
* run gpedit.msc
* User Configuration > Windows Settings > Scripts (Logon/Logoff)
* double click on Logoff script and Add the batch file