Technology Microsoft Software & solutions

How to Use .Dll in VBS

    • 1). Create a text file on your desktop and rename the file "AutoExist.vbs". It is important to name the file with the extension "vbs" as this is how Windows knows to run the file as a VB script.

    • 2). Right-click the icon of the new file and select "Edit." Windows should open the file as an empty file in notepad. It may use a different editor, if one has been installed, but by default VBS files are edited with notepad.

    • 3). Put this code in the file:

      dim fso, file

      Set fso = CreateObject("Scripting.FileSystemObject") ' Load the FileSystemObject

      ' from within the scripting dll

      file = "c:\autoexec.bat"

      if fso.fileexists(file) then ' Call a method of the object that resides in the dll

      MsgBox("AutoExec.bat Exists")

      end if

    • 4). Save the file. You can keep notepad open to change the script as needed.

    • 5). Double click the "AutoExist.vbs" file and windows will execute the script. If the file "c:\autoexec.bat" exists a message box will pop up, if the file doesn't exist nothing will happen.

SHARE
RELATED POSTS on "Technology"
How to Stop Windows Genuine Notification Wizard
How to Stop Windows Genuine Notification Wizard
How to Use Windows XP Professional to Upgrade to Windows MCE 2005
How to Use Windows XP Professional to Upgrade to Windows MCE 2005
How do I Launch a Keyboard Macro?
How do I Launch a Keyboard Macro?
How to Tell If Windows Need Replacing
How to Tell If Windows Need Replacing
How to Uninstall a Malware Protector
How to Uninstall a Malware Protector
How to Get Rid of Newlines
How to Get Rid of Newlines
PC Diagnostic Help
PC Diagnostic Help
How to Disable Remote Devices in Group Policy
How to Disable Remote Devices in Group Policy
I Can't Use the Volume Buttons on My Headphones on My XP PC
I Can't Use the Volume Buttons on My Headphones on My XP PC
How to Restore Your PC to One Month Ago in Vista
How to Restore Your PC to One Month Ago in Vista
How to Unlock Volume Icons in the Notification Area of Windows Vista
How to Unlock Volume Icons in the Notification Area of Windows Vista
How to Fix Run Dll Errors
How to Fix Run Dll Errors
How To Run In Safe Mode In Windows Vista
How To Run In Safe Mode In Windows Vista
Microsoft Windows 2000 Registry Repair
Microsoft Windows 2000 Registry Repair
How to Unzip Files in Windows Vista Home Basic
How to Unzip Files in Windows Vista Home Basic
How to Enter Safe Mode on an Asus Eee PC
How to Enter Safe Mode on an Asus Eee PC
How to Open an HP Computer
How to Open an HP Computer
How to Identify What Network Adapters Are Installed on Windows Vista With No Manufacturer Listed
How to Identify What Network Adapters Are Installed on Windows Vista With No Manufacturer Listed
How to Fix Virtual Memory That Is Running Low
How to Fix Virtual Memory That Is Running Low
The Windows Update Won't Work After Installing XP SP3
The Windows Update Won't Work After Installing XP SP3
How to Access the BIOS Menu
How to Access the BIOS Menu
List of Computer Database Registry Programs
List of Computer Database Registry Programs
How to Boot a Computer to VMware
How to Boot a Computer to VMware
How to Raise Data Recovery for XFS
How to Raise Data Recovery for XFS
How to Clear the Windows ARP Cache
How to Clear the Windows ARP Cache

Leave Your Reply

*