Take the 2-minute tour ×

I'm writing pop-up's for a website (please don't get angry. It's an internal application that shows energy usage for different buildings and the specification is to alert the users every time they log on) and I have a VBScript script that will run at the end of the a Windows user's logon script.

Is there a command to run the script from within Visual Studio rather than having to drop to Windows Explorer. It's only a tiny thing but if I don't ask I'll never know!

I have VBScript script running at the end of some local builds and such but I'd like to be able to select the file, right-click, then run. But I don't seem to be able to.

share|improve this question

4 Answers 4

up vote 1 down vote accepted

You can create a macro that runs your script, either by invoking cscript/wscript or by using the scripting COM-component. You can then add the macro to the context menu.

Another way is to add it as en external tool on the tool menu.

share|improve this answer
I do this by adding cscript.exe as external tool. Value for Command field is 'C:\WINDOWS\system32\cscript.exe', for Arguments '//Nologo $(ItemPath)' and for InitialDir '$(ItemDir)' in the External tools dialog. –  Uros Calakovic Aug 10 '09 at 14:28
I'm liking this one the most so far! Will try it tomorrow and accept if it works - thanks svinto. –  David A Gibson Aug 10 '09 at 19:15
That's excellent I have an external tool that runs the script from the command bar. Thanks to you both! –  David A Gibson Aug 11 '09 at 8:10

I don't believe so, but am hoping I am proved wrong.

share|improve this answer

To do what you want you need to extend the Visual Studio development environment by using an add-in. I don't know if the add-in you need already exists, but it is possible to write your own.

There is a list of popular add-ins here on Stack Overflow.

share|improve this answer

Try running cscript //X yourvbscript.vbs - it'll promt you for the debugging application. Select Visual Studio if have it installed.

Can do the same thing from VS but I don't remember at this moment ...

share|improve this answer
Did you read the question? –  svinto Aug 10 '09 at 14:17

Your Answer


