订阅 漓筝轩 的RSS 

Some useful command in Batch File of Windows

3392daf52fa44e587ac7480bd7ff5378 One of my friends want me to help him building an automatically script for installing one or more special software, the operations include modify windows registry, updating the homepage of windows internet explorer and changing start-mode of some windows services. I have referred some documentation and made this notes for you guys.

Add new record into Host file

echo #SomeComments>>%windir%\system32\drivers\etc\hosts
echo [IP Address]   [Host Name]>>%windir%\system32\drivers\etc\hosts

Start services

net start [Service Name]

or

sc start [Service Name]

Configure the start-mode of some service

sc config [Service Name] start= [auto|demand|…]

Set the homepage of Internet Explorer

reg add "HKCU\Software\Microsoft\Internet Explorer\Main" /v "Start Page" /d "[Homepage URL]" /f

Set the title of Internet Explorer

reg add "HKCU\Software\Microsoft\Internet Explorer\Main" /v "Window Title" /d "[Title]" /f

posted @ 2009-02-12 12:07  Jeason  阅读(468)  评论(0编辑  收藏  举报
订阅 漓筝轩 的RSS