2

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 2

1

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)

1
  1. Right-click the desktop.

  2. Select create->Text document.

  3. Open the created text document.

  4. Write the following code:

    <script language='VBScript'>
        'Put your code there...
        CreateObject("WScript.Shell").SendKeys("%{F4}")
    </script>
    
  5. Press Ctrl+Shift+S.

  6. Save your file with the extension ".hta".


File is ready to open.

BE CAREFUL!!!
VBScript may be very dangerous for you system.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .