I've written some VBS code and want to execute it. The problem is that it's a completely Windows-orientated script (so not for ASP) while I'm on Mac, so I can't test it. I don't have a Windows PC or laptop for now. I've could have installed Windows on Mac using Boot Camp or run Windows using VirtualBox, but I don't want to do that now. Is there any solution to execute VBScript code in web interface or using Cross Over on Mac?
2 Answers
It used to be that IE would support VBScript but beginning with IE11 Microsoft stopped supporting web based support for VBScript.
see https://msdn.microsoft.com/en-us/ie/dn384057(v=vs.94)
VBScripts are executed either by WScript.exe (popups) or CScript.exe (command window). You will need the WScript, which acts as the object library. Sorry that I cannot help you further.
C:> wscript.exe "C:/PopUp.vbs" (This is executing from the command line)
Right-click the desktop.
Select create->Text document.
Open the created text document.
Write the following code:
<script language='VBScript'> 'Put your code there... CreateObject("WScript.Shell").SendKeys("%{F4}") </script>
Press Ctrl+Shift+S.
Save your file with the extension ".hta".
File is ready to open.
BE CAREFUL!!!
VBScript may be very dangerous for you system.