VbsEdit, the award-winning VBScript editor that dramatically reduces the time you spend writing .VBS scripts

Sample scripts


Storage
   Folders
       Bind to a Folder Using the Browse for Folder Dialog Box , WMI

' Bind to a Folder Using the Browse for Folder Dialog Box


Const WINDOW_HANDLE = 0
Const NO_OPTIONS = 0

Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.BrowseForFolder _
    (WINDOW_HANDLE"Select a folder:", NO_OPTIONS"C:\Scripts")       
Set objFolderItem = objFolder.Self

objPath = objFolderItem.Path
objPath = Replace(objPath"\""\\")

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}\\" & strComputer & "\root\cimv2")

Set colFiles = objWMIService.ExecQuery _
    ("Select * from Win32_Directory where name = '" & objPath & "'")

For Each objFile in colFiles
    Wscript.Echo "Readable: " & objFile.Readable
Next



VbsEdit includes all these samples!




Download Now!

Version 5.4.1 - This package includes VbsEdit 32-bit, VbsEdit 64-bit, HtaEdit 32-bit and HtaEdit 64-bit.
The evaluation version never expires.



Home

Copyright (C) 2001-2012 Adersoft