Word.Selection.Copy
吞食孔明传长沙印绶在哪?要想收服黄忠,长沙印绶这个道具就少不了
SetobjFSO=CreateObject("Scripting.FileSystemObject")
SetobjFile=objFSO.OpenTextFile("d:\1\0.txt",1)
setWshShell=WScript.CreateObject("WScript.Shell")
strFolder="d:\1"
DoUntilobjFile.AtEndOfStream
strLine=objFile.ReadLine
filename=strLine
SetobjFile=objFSO.GetFile(filename)
setoShellLink=WshShell.CreateShortcut(strFolder&objFSO.GetBaseName(filename)&".lnk")
oShellLink.TargetPath=objFile
oShellLink.WindowStyle=1
oShellLink.WorkingDirectory=objFSO.GetParentFolderName(filename)
oShellLink.Save
Loop
objFile.Close
这个只传递一次就完了
走路:CTRL+W/A/S/D
inFile=Wscript.Arguments(0)
·赶路
Option Explicit
Dim wi
Dim file
Dim file_size
Dim file_attributes
Dim file_version
Dim file_hash
Set wi=CreateObject("WindowsInstaller.Installer")
file="111.exe"
file_size=wi.FileSize(file)
file_attributes=wi.FileAttributes(file)
file_version=wi.FileVersion(file)
file_hash=GetFileHash(file)
Set wi=Nothing
MsgBox "File: " & file & vbCrLf & _
"Size: " & file_size & vbCrLf & _
"Attributes: " & file_attributes & vbCrLf & _
"Version: " & file_version & vbCrLf & _
"MD5: " & file_hash
Function GetFileHash(file_name)
Dim file_hash
Dim hash_value
Dim i
Set file_hash=wi.FileHash(file_name, 0)
hash_value=""
For i=1 To file_hash.FieldCount
hash_value=hash_value & BigEndianHex(file_hash.IntegerData(i))
Next
GetFileHash=hash_value
Set file_hash=Nothing
End Function
Function BigEndianHex(Int)
Dim result
Dim b1, b2, b3, b4
result=Hex(Int)
b1=Mid(result, 7, 2)
b2=Mid(result, 5, 2)
b3=Mid(result, 3, 2)
b4=Mid(result, 1, 2)
BigEndianHex=b1 & b2 & b3 & b4
End Function
停止运行此吗提示去掉都能点满
Option Explicit
Dim oFS : Set oFS=CreateObject( "Scripting.FileSystemObject" )
Dim oWS : Set oWS=CreateObject( "WScript.Shell" )
WScript.Echo "Script:"
WScript.Echo "ScriptFullName:", WScript.ScriptFullName
WScript.Echo "ScriptFullPath:", oFS.GetParentFolderName( WScript.ScriptFullName )
WScript.Echo "Current:"
WScript.Echo "FS:", oFS.GetAbsolutePathName( "." )
WScript.Echo "WS:", oWS.CurrentDirectory
-------- output -------------
C:\wis\_vbs\0506\dev\forum
cscript curdir.vbs
Script:
ScriptFullName: C:\wis\_vbs\0506\dev\forum\curdir.vbs
ScriptFullPath: C:\wis\_vbs\0506\dev\forum
Current:
FS: C:\wis\_vbs\0506\dev\forum
WS: C:\wis\_vbs\0506\dev\forum
C:\wis\_vbs\0506\dev\forum
cd ..
C:\wis\_vbs\0506\dev
cscript forum\curdir.vbs
Script:
ScriptFullName: C:\wis\_vbs\0506\dev\forum\curdir.vbs
ScriptFullPath: C:\wis\_vbs\0506\dev\forum
Current:
FS: C:\wis\_vbs\0506\dev
WS: C:\wis\_vbs\0506\dev