baomaboy
银牌会员
积分 1513
发帖 554
注册 2005-12-30
状态 离线
|
『第
4 楼』:
Quote: | Dim WshSHell,FSO
On Error Resume Next
Set WshSHell = WScript.CreateObject("WScript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")
Set WinVer = WshSHell.Environment("Process")
Set Args = WScript.Arguments
CloseTime = 5
FileName = WScript.ScriptName
FileFullName = WScript.ScriptFullName
FilePath = FSO.GetParentFolderName(FileFullName)
InsPath = FSO.GetSpecialFolder(1)
InsFullName = FSO.BuildPath(InsPath ,FileName)
LnkPathNT = WshSHell.SpecialFolders(2)
LnkPath9X = WshSHell.SpecialFolders(14)
LnkPathAll = WshSHell.SpecialFolders("StartMenu")
OtherFileName="CS_Mouse_Quicken"
OtherFilePath=FSO.GetSpecialFolder(1)
TemFileName = "CS_Mouse_Quicken.reg"
TemFilePath = FSO.GetSpecialFolder(1)
Copyright="玲珑科技"
QQ="QQ:25926183"
Email="Email:fty1995@163.com"
InsTitle="取消XP中CS鼠标加速"
InsAnswer="取消XP中CS鼠标加速"
RegPath0="HKEY_CURRENT_USER\Control Panel\Mouse\"
RegPath1="HKEY_CLASSES_ROOT\CLSID\{208D2C60-3AEA-1069-A2D7-08002B30309D}\shell\CS_Mouse_Quicken\"
RegValue1="取消/恢复XP中CS鼠标加速"
RegForm1="REG_SZ"
RegPath2="HKEY_CLASSES_ROOT\CLSID\{208D2C60-3AEA-1069-A2D7-08002B30309D}\shell\CS_Mouse_Quicken\command\"
RegValue2="wscript.exe "&InsFullName
RegForm2="REG_SZ"
RegPath3="HKEY_CURRENT_USER\Control Panel\Mouse\MouseSpeed"
RegValue3="1"
RegPath4="HKEY_CURRENT_USER\Control Panel\Mouse\MouseThreshold1"
RegValue4="6"
RegPath5="HKEY_CURRENT_USER\Control Panel\Mouse\MouseThreshold2"
RegValue5="10"
RegValue6="0"
MyShortcutFolder="快捷功能"
MyShortcutName="添加/取消快捷方式字样和箭头.Lnk"
If WinVer("OS") = "Windows_NT" Then
IF FileFullName <> InsFullName then
intAnswer = MsgBox("【是】将“"+ InsAnswer +"”加入到网上邻居右键菜单,"&Chr(10)&Chr(10)&"【否】将“"+ InsAnswer +"”从网上邻居右键菜单删除。 ", vbQuestion + vbYesNoCancel, "安装 - "+ InsTitle +" - "+ Copyright)
If intAnswer = vbYes Then
WshSHell.RegWrite RegPath1,RegValue1,RegForm1
WshSHell.RegWrite RegPath2,RegValue2,RegForm2
FSO.GetFile(FileFullName).Copy(InsFullName)
if WshSHell.RegRead(RegPath1) = "取消XP中CS鼠标加速" then
WshSHell.RegWrite RegPath1, "恢复XP中CS鼠标加速", "REG_SZ"
else
WshSHell.RegWrite RegPath1, "取消XP中CS鼠标加速", "REG_SZ"
end if
WshSHell.popup _
"添加脚本文件:"+chr(10)+InsFullName+chr(10)+chr(10)+ _
"添加注册表项:"+chr(10)+chr(34)+ RegPath1 +chr(34)+chr(10)+ _
chr(10) & CloseTime & " 秒钟后本窗口将自动关闭!" +chr(10)+chr(10)+ _
chr(10) & "Copyright(C) " + Copyright +" " & QQ &" " + Email _
, CloseTime, "安装成功 - "+ InsTitle +" - "+ Copyright, 0 + 64
end if
If intAnswer = vbNo Then
WshSHell.RegDelete RegPath2
WshSHell.RegDelete RegPath1
FSO.DeleteFile InsFullName
WshSHell.popup _
"删除脚本文件:"+chr(10)+InsFullName+chr(10)+chr(10)+ _
"删除注册表项:"+chr(10)+chr(34)+ RegPath1 +chr(34)+chr(10)+ _
chr(10) & CloseTime & " 秒钟后本窗口将自动关闭!" +chr(10)+chr(10)+ _
chr(10) & "Copyright(C) " + Copyright +" " & QQ &" " + Email _
, CloseTime, "卸载成功 - "+ InsTitle +" - "+ Copyright, 0 + 64
End If
If intAnswer = vbCancel Then
end if
ELSE
if WshSHell.RegRead(RegPath1) = "取消XP中CS鼠标加速" then
WshSHell.RegWrite RegPath3,RegValue6,RegForm1
WshSHell.RegWrite RegPath4,RegValue6,RegForm1
WshSHell.RegWrite RegPath5,RegValue6,RegForm1
Set NewRegFile = FSO.CreateTextFile(FSO.BuildPath(TemFilePath ,TemFileName), True)
NewRegFile.WriteLine("Windows Registry Editor Version 5.00")
NewRegFile.WriteLine("")
NewRegFile.WriteLine("[HKEY_CURRENT_USER\Control Panel\Mouse]")
NewRegFile.WriteLine(chr(34)&"SmoothMouseXCurve"&chr(34)&"=hex:00,00,00,00,00,00,00,00,00,a0,00,00,00,00,00,00,00,40,\")
NewRegFile.WriteLine(" 01,00,00,00,00,00,00,80,02,00,00,00,00,00,00,00,05,00,00,00,00,00")
NewRegFile.WriteLine(chr(34)&"SmoothMouseYCurve"&chr(34)&"=hex:00,00,00,00,00,00,00,00,66,a6,02,00,00,00,00,00,cd,4c,\")
NewRegFile.WriteLine(" 05,00,00,00,00,00,a0,99,0a,00,00,00,00,00,38,33,15,00,00,00,00,00")
NewRegFile.Close
WshSHell.Run ("regedit.exe /s "&FSO.BuildPath(TemFilePath ,TemFileName)), vbHide
WshSHell.RegWrite RegPath1, "恢复XP中CS鼠标加速", "REG_SZ"
else
WshSHell.RegWrite RegPath3,RegValue3,RegForm1
WshSHell.RegWrite RegPath4,RegValue4,RegForm1
WshSHell.RegWrite RegPath5,RegValue5,RegForm1
Set NewRegFile = FSO.CreateTextFile(FSO.BuildPath(TemFilePath ,TemFileName), True)
NewRegFile.WriteLine("Windows Registry Editor Version 5.00")
NewRegFile.WriteLine("")
NewRegFile.WriteLine("[HKEY_CURRENT_USER\Control Panel\Mouse]")
NewRegFile.WriteLine(chr(34)&"SmoothMouseXCurve"&chr(34)&"=hex:00,00,00,00,00,00,00,00,15,6e,00,00,00,00,00,00,00,40,\")
NewRegFile.WriteLine(" 01,00,00,00,00,00,29,dc,03,00,00,00,00,00,00,00,28,00,00,00,00,00")
NewRegFile.WriteLine(chr(34)&"SmoothMouseYCurve"&chr(34)&"=hex:00,00,00,00,00,00,00,00,b8,5e,01,00,00,00,00,00,cd,4c,\")
NewRegFile.WriteLine(" 05,00,00,00,00,00,cd,4c,18,00,00,00,00,00,00,00,38,02,00,00,00,00")
NewRegFile.Close
WshSHell.Run ("regedit.exe /s "&FSO.BuildPath(TemFilePath ,TemFileName)), vbHide
WshSHell.RegWrite RegPath1, "取消XP中CS鼠标加速", "REG_SZ"
end if
WshSHell.Run ("ShutDown -L"), vbHide
end if''
else
WshShell.popup _
"程序要求运行于 " + chr(34)+WinVer("OS")+chr(34)+" 环境,安装失败。"+chr(10)+chr(10)+ _
chr(10) & "Copyright(C) " + Copyright +" " & QQ &" " + Email _
, CloseTime, "安装失败 - "+ InsTitle +" - "+ Copyright, 0 + 48
End IF
Set WshSHell = Nothing
Set FSO = Nothing
Set Args = Nothing
WScript.Quit(0) |
|
[ Last edited by baomaboy on 2008-3-25 at 01:03 AM ]
|
好多菩提树,好多明镜台。本来好多物,好多的尘埃。 |
|