1

I created a macro in Excel and i am running it from a .vbs file. It's working fine on my laptop. I copied the same work on a new laptop and each time i am running the vbs file this window appears on the screen.

enter image description here

I have made some research and read that the situation i mentioned is happening when loading CheckNDISPort service on the startup. But i don't believe it's the reason because when i go to task manager and check in the startUp tab i don't find this service. Also when i restart my laptop i don't get this window, only when i am running my vbs file. I am sure there is any problem with my vbs file too because on the other laptops it's working fine.

Any suggestion please how to get ride of this pop up ? For now i am closing the window each time or ending the task from task manager but everytime i run it again so it pops up again.
Thank you very much.

JuniorDev
  • 433
  • 3
  • 14
  • 30
  • Possible duplicate of [How to change cscript.exe to wscript.exe execution for all VBScript files?](http://stackoverflow.com/questions/1464403/how-to-change-cscript-exe-to-wscript-exe-execution-for-all-vbscript-files) – Soonts Mar 29 '17 at 20:41
  • Why did you tag this with syswow64? I realize it is in the path in your screenshot but I don't think it is relevant to your question. – Anders Mar 30 '17 at 01:28

1 Answers1

3

Windows Scripting Host has two interpreter front-ends, wscript.exe and cscript.exe. cscript.exe is a console application and if cscript.exe is set as the default a console window will open every time you execute a script.

Run cmd.exe elevated as administrator and run wscript.exe //h:wscript.

Depending on the Windows version, you might also be able to right-click a .vbs file, select "Open with...", choose %windir%\system32\wscript.exe and check the "default" checkbox.

Anders
  • 97,548
  • 12
  • 110
  • 164