I have many different .vbs scipts that I can click on to do various tasks (such as map network drives, WOL computers, and Remote Shutdown computers). All I want to do is to be able to press a button and it will activate the scipt. What is the code that would call the .vbs file and execute it in the IDE
I tried to use "Add Existing Item" and put the script into the Solution Exploerer, but it either didn't put it in the IDE or I don't know how to call it.
Thanks

How to use an external script in IDE
daveodolph
otakung
hi,
you can add those scripts to your project resources, or to make it demanded for your program, ok add existing items to your project then right click the items in solution explorer and select properties , set copy if newer, and build action = contents
right click your project name and go to publish \ application files you will find your scripts there
to run them you will need to use assemply to get the path of your application to run this contents FAQ thread at the top of this forum have example on that so you will get your application path then determn wich script you want to run .
hope this helps
GGiant
Thanks Ken. That made my script work. But I still have the problem of packaging the script up with the program. I will publish my program, but it still wants to look for the script as a path on my computer. I am writing this program for many different locations on many different machines.
How do I package it so that one path name with work for different workstations