几个有用的批处理

时间:2021-05-24 08:52:52

Add new record into Host file

echo #SomeComments>>%windir%system32driversetchosts

echo [IP Address]   [Host Name]>>%windir%system32driversetchosts

 

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 "HKCUSoftwareMicrosoftInternet ExplorerMain" /v "Start Page" /d "[Homepage URL]" /f

 

Set the title of Internet Explorer

reg add "HKCUSoftwareMicrosoftInternet ExplorerMain" /v "Window Title" /d "[Title]" /f