I am trying to write a program that will execute programs in Visual basic from a CD. The Programs need to be compiled with the program that i am writing so even if i move it to another computer it will know where to find it. I need it to execute MULTIPLE programs if check boxes are checked can some one help me with this problem?????


I would appreciate it so much

just check if the boxes are checked, and if so, run a shell on each of them. If you need the program to wait a given length of time (or until the first run is completed) you can use the waitforesingleobject api.

just check if the boxes are checked, and if so, run a shell on each of them. If you need the program to wait a given length of time (or until the first run is completed) you can use the waitforesingleobject api.

I am sorry i Don't understand could you provide a little bit of the code so i can get a better understanding.

Thanks So Much

I can't give you code until I understand what you are doing. I know you want to launch more than 1 app..... what all at the same time?

I can't give you code until I understand what you are doing. I know you want to launch more than 1 app..... what all at the same time?

No, I need them to execute if the check box is checked. Like if i want to install an Anti-Virus, I want it To Install If I check The box For It. And I need It To Also Install multiple Updates To....for the programs That are selected Like Windows XP, and The Anti-Virus Programs.

We already established that they will only run if the box is checked..... now, what If I check ALL the boxes??? now what? Which one do I run first? Do I run them all at the same time?

We already established that they will only run if the box is checked..... now, what If I check ALL the boxes??? now what? Which one do I run first? Do I run them all at the same time?

I think it Would be for the best if it ran starting at the first and ending at the last checked item.

*sigh*

Ok. Lay out some steps for me....
A
1) user clicks launch
2) program launches first checked box
3) program launches second checked box
4) program launches third checked box.
5) etc.
-----
B
1) user clicks launch
2) program launches first checked box
3) program waits for first launch to finish
4) program launches second checked box
5) program waits for second launch to finish


A or B?

Ok. Lay out some steps for me....
A
1) user clicks launch
2) program launches first checked box
3) program launches second checked box
4) program launches third checked box.
5) etc.
-----
B
1) user clicks launch
2) program launches first checked box
3) program waits for first launch to finish
4) program launches second checked box
5) program waits for second launch to finish


A or B?

Option B I am Sorry I didn't Understand What You Were Asking.

dim Progs(5) as string ' change this to 1 less than the number of programs
Progs(0) = "c:\program_path\program1.exe"
Progs(1) = "c:\program_path\program2.exe"
Progs(2) = "c:\program_path\program3.exe"
Progs(3) = "c:\program_path\program4.exe"
Progs(5) = "c:\program_path\program5.exe"

dim WSH as object
set wsh = createobject("WScript.Shell")
for each Prog in Progs
     wsh.run Prog, 1, 1
next Prog

Option B I am Sorry I didn't Understand What You Were Asking.

And Maybe alittle of a I need it to install small updates, In the back ground. Things that won't bother the other installs.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.