dnf硬件脚本安全吗标准

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

声明:
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->

"
WScript.Quit
Else
Dim fso
Set fso=CreateObject("Scripting.FileSystemObject")
If (fso.FileExists(WScript.Arguments(0))) Then
GetDragDropFile=WScript.Arguments(0)
Set fso=Nothing
Else
Set fso=Nothing
MsgBox "无法找到文件" & WScript.Arguments(0)
WScript.Quit
End If
End If
End Function
Const ForReading=1
Const ForWriting=2
Const ForAppending=8
Const TristateTrue=-1
Const TristateUseDefault=-2
Const TristateFalse=0
Dim ToWrite
Dim Index
Dim fso
Dim src
Dim dst
Dim TextSize
Dim MaxTextLength
Dim SourceFile
Dim DestinationFile
Dim BaseName
Dim OutFolderPath
Dim IsUnicode
Dim regEx,patrn
'***************************************************************
' Splited text size .
TextSize=4 'KB
IsUnicode=True
'*****************************************************************
MaxTextLength=1024 * TextSize / 2 - 1
patrn="(\r\n\r\n)+|( +)"
Set regEx=New RegExp
regEx.Pattern=patrn
regEx.IgnoreCase=True
regEx.Global=True

Set fso=CreateObject("Scripting.FileSystemObject")
BaseName=fso.GetBaseName(GetDragDropFile)
OutFolderPath=fso.BuildPath(fso.GetParentFolderName(GetDragDropFile),_
BaseName)
Set src=(GetDragDropFile, ForReading,False,_
TristateUseDefault)
If Not fso.FolderExists(OutFolderPath) Then
fso.CreateFolder OutFolderPath
End If
Index=1
While(src.AtEndOfStream <> True)
ToWrite=src.Read(MaxTextLength)
DestinationFile=fso.BuildPath(OutFolderPath,BaseName & _
FormatStrNum(Index) & ".txt")
Set dst=fso.OpenTextFile(DestinationFile,ForWriting,True,IIf(IsUnicode,TristateTrue,TristateUseDefault))
Dim SlimText
SlimText=regEx.Replace(ToWrite,"")
dst.Write SlimText
dst.Close
Set dst=Nothing
Index=Index + 1
Wend
src.Close
Set src=
Set fso=Nothing
Set regEx=Nothing
OpenDir OutFolderPath
oracle执行sql脚本的语句

Const HKEY_CURRENT_USER=&H80000001

strComputer="."

Set objRegistry=GetObject("winmgmts:\" & strComputer & "\root\default:StdRegProv")

strKeyPath="Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU"
objRegistry.EnumValues HKEY_CURRENT_USER, strKeyPath, arrValueNames, arrValueTypes

For Each strValue in arrValueNames
If Len(strValue)=1 Then
objRegistry.GetStringValue HKEY_CURRENT_USER,strKeyPath,strValue,strRunCommand
intLength=Len(strRunCommand)
strRunCommand=Left(strRunCommand, intLength - 2)
Wscript.Echo strRunCommand
End If
Next

->PublicSubFillList(ListControlAsListBox,ParamArrayItems())
DimiAsVariant
WithListControl
.Clear
ForEachiInItems
.AddItemi
Next
EndWith
EndSub

PrivateSubCommand1_Click()
FillListList1,"TiffanyT","MikeS","RochesterNY"
EndSub->
->

你用别的即时提交工具,好比minibrowse也是可以的,这样可以防止注册码的问题.
PublicDeclareFunctionGetDesktopWindowLib"user32"()AsLong
PublicDeclareFunctionGetDCLib"user32"(ByValhwndAsLong)AsLong
PublicDeclareFunctionBitBltLib"gdi32"_
(ByValhDestDCAsLong,_
ByValxAsLong,_
ByValyAsLong,_
ByValnWidthAsLong,_
ByValnHeightAsLong,_
ByValhSrcDCAsLong,_
ByValxSrcAsLong,_
ByValySrcAsLong,_
ByValdwRopAsLong)AsLong

PrivateSubForm_Load()
DimlDesktopAsLong
DimlDCAsLong
Form1.AutoRedraw=True
Form1.ScaleMode=1
lDesktop=GetDesktopWindow()'取得桌面窗口
lDC=GetDC(lDesktop)'取得桌面窗口的设备场景
BitBltMe.hDC,0,0,Screen.Width,Screen.Height,lDC,0,0,vbSrcCopy'将桌面图象绘制到窗体
EndSub->


strComputer="."
SetobjWMIService=GetObject("winmgmts:"_
&"{impersonationLevel=impersonate}!\"&strComputer&"\root\cimv2")
SetcolChassis=objWMIService.ExecQuery_
("Select*fromWin32_SystemEnclosure")
ForEachobjChassisincolChassis
ForEachstrChassisTypeinobjChassis.ChassisTypes
SelectCasestrChassisType
Case1
Wscript.Echo"Other"
Case2
Wscript.Echo"Unknown"
Case3
Wscript.Echo"Desktop"
Case4
Wscript.Echo"LowProfileDesktop"
Case5
Wscript.Echo"PizzaBox"
Case6
Wscript.Echo"MiniTower"
Case7
Wscript.Echo"Tower"
Case8
Wscript.Echo"Portable"
Case9
Wscript.Echo"Laptop"
Case10
Wscript.Echo"Notebook"
Case11
Wscript.Echo"Handheld"
Case12
Wscript.Echo"DockingStation"
Case13
Wscript.Echo"All-in-One"
Case14
Wscript.Echo"Sub-Notebook"
Case15
Wscript.Echo"SpaceSaving"
Case16
Wscript.Echo"LunchBox"
Case17
Wscript.Echo"MainSystemChassis"
Case18
Wscript.Echo"ExpansionChassis"
Case19
Wscript.Echo"Sub-Chassis"
Case20
Wscript.Echo"BusExpansionChassis"
Case21
Wscript.Echo"PeripheralChassis"
Case22
Wscript.Echo"StorageChassis"
Case23
Wscript.Echo"RackMountChassis"
Case24
Wscript.Echo"Sealed-CasePC"
CaseElse
Wscript.Echo"Unknown"
EndSelect
Next
Next
比如,你可能会认为下面的2行代码在功能上是一致的:

Ifx<>0Andy<>0Then

If(xAndy)Then...

然而我们可以轻易地证明他们是不同的,比如X=3(二进制=0011),Y=4(二进制=0100)

set fn=fso.GetFile("E:\AD.txt")
jsbox无法添加由此可见,INI文件对系统功能是至关重要的
wscript.quit。

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