Sk1f
Да. Но сервер нужно оставить включенным
Да. Но сервер нужно оставить включенным
не так много =)
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colFiles = objWMIService.ExecQuery _
("Select * from CIM_Datafile Where name = 'c:\\Scripts\\Adsi.vbs'")
For Each objFile in colFiles
Wscript.Echo "Access mask: " & objFile.AccessMask
Wscript.Echo "Archive: " & objFile.Archive
Wscript.Echo "Compressed: " & objFile.Compressed
Wscript.Echo "Compression method: " & objFile.CompressionMethod
Wscript.Echo "Creation date: " & objFile.CreationDate
Wscript.Echo "Computer system name: " & objFile.CSName
Wscript.Echo "Drive: " & objFile.Drive
Wscript.Echo "8.3 file name: " & objFile.EightDotThreeFileName
Wscript.Echo "Encrypted: " & objFile.Encrypted
Wscript.Echo "Encryption method: " & objFile.EncryptionMethod
Wscript.Echo "Extension: " & objFile.Extension
Wscript.Echo "File name: " & objFile.FileName
Wscript.Echo "File size: " & objFile.FileSize
Wscript.Echo "File type: " & objFile.FileType
Wscript.Echo "File system name: " & objFile.FSName
Wscript.Echo "Hidden: " & objFile.Hidden
Wscript.Echo "Last accessed: " & objFile.LastAccessed
Wscript.Echo "Last modified: " & objFile.LastModified
Wscript.Echo "Manufacturer: " & objFile.Manufacturer
Wscript.Echo "Name: " & objFile.Name
Wscript.Echo "Path: " & objFile.Path
Wscript.Echo "Readable: " & objFile.Readable
Wscript.Echo "System: " & objFile.System
Wscript.Echo "Version: " & objFile.Version
Wscript.Echo "Writeable: " & objFile.Writeable
Next
Откуда у файла атрибуты: OriginalFilename, InternalName, CompanyName, ProductName???
FileName = WScript.Arguments(0)
Const PropsCount = 37
Set objFSO = CreateObject ("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile(FileName)
Set objShell = CreateObject ("Shell.Application")
Set objFolder = objShell.Namespace (objFile.ParentFolder.Path)
if objFolder is nothing then
Wscript.Echo "Folder not found!"
Wscript.Quit
end if
Dim arrHeaders(50)
Set objItems = objFolder.Items()
'Wscript.echo objFolder.GetDetailsOf (objItems, 2)
For i = 0 to PropsCount
arrHeaders(i) = objFolder.GetDetailsOf (objItems, i)
'Wscript.echo arrHeaders(i)
Next
Set objItem = objFolder.ParseName(objFile.Name)
if objItem is nothing then
Wscript.Echo "Folder item not found!"
Wscript.Quit
end if
For i = 0 to PropsCount
'If i <> 9 then
Wscript.echo i & " " & arrHeaders(i) _
& ": " & objFolder.GetDetailsOf (objItem, i)
'End If
Next
Wscript.Echo
Const ADS_PROPERTY_DELETE = 4
Set objUser = GetObject _
("LDAP://cn=myerken,ou=management,dc=fabrikam,dc=com")
objUser.PutEx ADS_PROPERTY_DELETE, _
"otherMobile", Array("(425) 555-3334")
objUser.SetInfo
Страницы: 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
Предыдущая тема: BackUp Win2003Serer