Error – “There is no script engine for file extension .vbs” when using “Git Bash Here” in Windows 7

The problem is caused by associating .vbs files with a program other than Microsoft Windows Based Script Host (the default). In my case, I had associated the files with Notepad++. I was able to solve it by running Notepad++ as an administrator and removing the file association for .vbs files. If you’re not sure which … Read more

VBScript support in Internet Explorer 11

The IE team has been trying to retire VBScript for years. http://msdn.microsoft.com/en-us/library/windows/apps/Hh700404.aspx indicates that support was removed from the ExecScript API. http://msdn.microsoft.com/en-us/library/ie/dn384057(v=vs.85).aspx explains that it’s removed from IE11 Edge mode in the Internet Zone. If you add the following to your HEAD tag, your VBScript will run: <meta http-equiv=”x-ua-compatible” content=”IE=10″>

How to call a VBScript file in a C# application?

The following code will execute a VBScript script with no prompts or errors and no shell logo. System.Diagnostics.Process.Start(@”cscript //B //Nologo c:\scripts\vbscript.vbs”); A more complex technique would be to use: Process scriptProc = new Process(); scriptProc.StartInfo.FileName = @”cscript”; scriptProc.StartInfo.WorkingDirectory = @”c:\scripts\”; //<—very important scriptProc.StartInfo.Arguments =”//B //Nologo vbscript.vbs”; scriptProc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; //prevent console window from popping up … Read more