win7中系统常用设置【已解决】
本帖最后由 zhangchongzhi 于 2011-10-1 12:45 编辑大家好呗:在win7中常用的一些设置用AU3写完喽。谢谢大家的帮助喽。
系统设置内容:
1.设置首页为:http://www.2345.com/?kruicheng
2.设置电源 让电脑一直开着,不让它停下来
3.关闭防火墙 Windows Firewall
4.关闭自动更新 Windows Update
5.关闭安全中心 Security Center
6.关闭 Windows Defender
7.建立宽带连接并显示在桌面上
8.关闭消息中心。
#RequireAdmin
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=..\icon\systemcon.ico
#AutoIt3Wrapper_outfile=systemsetup.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
;设置首页为 http://www.2345.com/?kruicheng
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main","Default_Page_URL","reg_sz","http://www.2345.com/?kruicheng")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main","Start Page","reg_sz","http://www.2345.com/?kruicheng")
;设置电源
;Runwait(@ComSpec & " /c " & 'powercfg -h off', "", @SW_HIDE) 关闭休眠
Runwait(@ComSpec & " /c " & 'powercfg /change /monitor-timeout-ac 0', "", @SW_HIDE)
Runwait(@ComSpec & " /c " & 'powercfg /change /disk-timeout-ac 0', "", @SW_HIDE)
Runwait(@ComSpec & " /c " & 'powercfg /change /standby-timeout-ac 0', "", @SW_HIDE)
Runwait(@ComSpec & " /c " & 'powercfg /change /hibernate-timeout-ac 0', "", @SW_HIDE)
#cs
cmd 命令powercfg
powercfg /create lenovo
powercfg /change lenovo /monitor-timeout-ac 0显示器
powercfg /change lenovo /disk-timeout-ac 0 硬盘
powercfg /change lenovo /standby-timeout-ac 0 待机
powercfg /change lenovo /hibernate-timeout-ac 0 休眠
powercfg /setactive lenovo
#ce
;关闭防火墙 Windows Firewall
;RunWait(@ComSpec & " /c " & 'netsh firewall set opmode disable', "", @SW_HIDE)
RunWait(@ComSpec & " /c " & 'sc stop MpsSvc', "", @SW_HIDE)
RunWait(@ComSpec & " /c " & 'sc config MpsSvc start= demand', "", @SW_HIDE)
;关闭自动更新 Windows Update
RunWait(@ComSpec & " /c " & 'sc stop wuauserv', "", @SW_HIDE)
RunWait(@ComSpec & " /c " & 'sc config wuauserv start= demand', "", @SW_HIDE)
;关闭安全中心 Security Center
RunWait(@ComSpec & " /c " & 'sc stop wscsvc', "", @SW_HIDE)
RunWait(@ComSpec & " /c " & 'sc config wscsvc start= demand', "", @SW_HIDE)
;关闭 Windows Defender
RunWait(@ComSpec & " /c " & 'sc stop WinDefend', "", @SW_HIDE)
RunWait(@ComSpec & " /c " & 'sc config WinDefend start= demand', "", @SW_HIDE)
#cs
关闭服务的命令
echo stop Windows Update
sc stop wuauserv
sc config wuauserv start= disabled
echo stop Security Center
sc stop wscsvc
sc config wscsvc start= disabled
echo stop Windows Defender
sc stop WinDefend
sc config WinDefend start= disabled
echo stopWindows Firewall
sc stop MpsSvc
sc config MpsSvc start= disabled
#ce
;建立宽带连接
If @OSVersion="WIN_7" Then
$pbkpath=@AppDataDir&"\Microsoft\Network\Connections\Pbk\rasphone.pbk"
If FileExists($pbkpath) And FileGetSize($pbkpath)/1024>1.5 Then
MsgBox(48,"温馨提示","宽带连接已存在!"&@CRLF&@CRLF&"如需重新建立,请先删除原来的宽带连接。",2)
Else
FileInstall("WIN_7_rasphone.pbk",$pbkpath,1)
FileInstall("WIN_7_宽带连接.lnk",@DesktopDir&"\宽带连接.lnk",1)
MsgBox(64,"温馨提示","宽带连接已建立!",2)
;Run(@ComSpec&" /c rasphone.exe -d 宽带连接","",@SW_HIDE)
EndIf
;关闭消息中心
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "HideSCAHealth", "REG_DWORD", "00000001")
ElseIf @OSVersion="WIN_XP" Then
$pbkpath=@AppDataCommonDir&"\Microsoft\Network\Connections\Pbk\rasphone.pbk"
If FileExists($pbkpath) And FileGetSize($pbkpath)/1024>1.5 Then
MsgBox(48,"温馨提示","宽带连接已存在!"&@CRLF&@CRLF&"如需重新建立,请先删除原来的宽带连接。",2)
Else
FileInstall("WIN_XP_rasphone.pbk",$pbkpath,1)
FileInstall("WIN_XP_宽带连接.lnk",@DesktopDir&"\宽带连接.lnk",1)
MsgBox(64,"温馨提示","宽带连接已建立!",3)
;Run(@ComSpec&" /c rasphone.exe -d 宽带连接","",@SW_HIDE)
EndIf
Else
MsgBox(16,"温馨提示","对不起,本程序只适用于Windows XP和Windows 7系统",2)
EndIf
#cs
Switch @OSVersion
Case "WIN_7"
$rasphone = @AppDataDir & "\Microsoft\Network\Connections\Pbk\rasphone.pbk" ;当前用户 Application Data 目录所在路径
JLKD()
Case "WIN_XP"
$rasphone = @AppDataCommonDir & "\Microsoft\Network\Connections\Pbk\rasphone.pbk"
JLKD()
EndSwitch
Func JLKD()
FileOpen($rasphone, 1)
If StringInStr(FileRead($rasphone), "[宽带连接]") = 0 Then
FileWriteLine($rasphone, "[宽带连接]")
FileWriteLine($rasphone, "Type=5")
FileWriteLine($rasphone, "PreviewDomain=0")
FileWriteLine($rasphone, "PreviewPhoneNumber=0" & @CRLF)
FileWriteLine($rasphone, "NETCOMPONENTS=")
FileWriteLine($rasphone, "ms_server=0")
FileWriteLine($rasphone, "ms_msclient=0" & @CRLF)
FileWriteLine($rasphone, "MEDIA=rastapi")
FileWriteLine($rasphone, "Port=PPPoE6-0")
FileClose($rasphone)
FileCreateShortcut(@WindowsDir & "\system32\rasphone.exe", @DesktopDir & "\宽带连接.lnk", @WindowsDir, " -d 宽带连接")
;Run(@ComSpec & " /c " & 'rasphone -d ADSL', "", @SW_HIDE)
Exit
EndIf
EndFunc ;==>JLKD
#ce
同求,请高手解答下,学习学习 请高手解答下 第二项比较难些,其他可以在论坛搜索里找到答案 找找教材,应该有类似的把 本帖最后由 netegg 于 2011-9-24 19:59 编辑
什么叫关掉,不要停服务?
另外,给你个建议,不要用xp的惯性思维来琢磨win7,win7优化设置不是这么玩的 回复 6# netegg
关闭防火墙 还不要提示。关闭防火墙 和停止防火墙服务 应该不一样吧{:face (396):}
可不可以给个好建议呀。期待中…… 回复 7# zhangchongzhi
你说的服务的服务名称是什么 回复 8# netegg
win7中的服务名是:MpsSvc
停服务命令是:echo stopWindows Firewall
sc stop MpsSvc
sc config MpsSvc start= disabled
不想要这个。要类似xp下的这个命令:netsh firewall set opmode disable
不知道怎么弄。这几天在找。有个参考,在看。http://support.microsoft.com/kb/947709/zh-cn 这个不太清楚了 仍在使用XP的飘过。貌似这些都可以使用监控软件监控出来的,有的是注册表修改,有的会生成一些设置文件,具体看监控出来的而定了! 进来学习Win7操作! 3Q 学习了...............
页:
[1]