Category Archives: VBS Scripts

Visual Basic Script that can be used to rename a file

Here I am trying to automatically load log files into a MS Access file. Log files are actually txt files which need their extension changed if like me you wish to automate their import into MS Access. The following Visual … Continue reading

Posted in All, VBS Scripts | Comments Off on Visual Basic Script that can be used to rename a file

MS Access Function – Run VBS script from within MS Access

A very simple function that will allow you to run any vbs script from within MS Access Function RunVBS() Shell “wscript c:\users\mark\vbs\RenameFile.vbs”, vbHide End Function

Posted in All, VBA Code MS Access, VBS Scripts | Comments Off on MS Access Function – Run VBS script from within MS Access

Compact Database automatically using this MS Access Function and VB Script

If like me you sometimes need to run multiple SQL statements in MS Access on a regular basis maybe at a particular time some of which are deletes, you will need to find a way to automate regular compacts. Here’s … Continue reading

Posted in All, Configuration, VBA Code MS Access, VBS Scripts | Comments Off on Compact Database automatically using this MS Access Function and VB Script

VBS – Pieces of code

Shutdown computer Option Explicit Dim oShell Set oShell = Wscript.CreateObject(“Wscript.Shell”) oShell.Run “SHUTDOWN -T 60 -S” ‘wait 60 seconds before shutting down Trigger speech Option Explicit Dim speechobject set speechobject=createobject(“sapi.spvoice”) speechobject.speak “Your system is setup and ready for your day” Delay … Continue reading

Posted in All, Configuration, VBS Scripts | Comments Off on VBS – Pieces of code

Using Task Scheduler and Visual Basic Scripts to automate pretty much anything Win 7

This is hardly ground breaking but windows Task Scheduler can be used to run VBS scripts on a variety of events to automate repetitive and boring tasks. Backups for example or refreshing caches on web browsers before users come in. … Continue reading

Posted in All, Backup, Configuration, Dev Ops, VBS Scripts | Comments Off on Using Task Scheduler and Visual Basic Scripts to automate pretty much anything Win 7

Start up VBS

OPTION EXPLICIT Dim WshShell Dim counter Dim shell Dim Outlook Dim objWord Dim objshell ‘Flash keyboard to show code is being hit Set WshShell = CreateObject( “WScript.Shell” ) counter = 0 While counter < 18 WshShell.SendKeys "{NUMLOCK}" WScript.Sleep 200 WshShell.SendKeys … Continue reading

Posted in All, Configuration, Dev Ops, VBS Scripts | Comments Off on Start up VBS

Rolling VBS save script

Want to backup files and don’t have a fancy Database Administrator or sysadmin on 40k that knows his way around SQL Server 08R2 and MS Access , windows server and fully complies with continuous backup? This might prove useful. With … Continue reading

Posted in All, Backup, VBS Scripts | Tagged , | Comments Off on Rolling VBS save script