How Do I make My Program Execute Multiple Programs At One Time Like Windows Update. If I have to make make a batch file or something could some one tell me how so i can get it done....

Thanks

Recommended Answers

All 3 Replies

In VB, The shell command (and many, many others) spawns a process, and then immediately returns to the next line of code execution. This isn't a problem, really. The problem comes about, when you want to WAIT for a spawned process to finish, before spawning a new process. For example, if I wanted to spawn notepad, and a calculator at the same time, this code would work (technically, it's not at the same time, but it's one immediately after the other, and doesn't wait.... so it appears to be at the same time):

shell "c:\windows\notepad.exe"
shell "c:\windows\system32\calc.exe"

In VB, The shell command (and many, many others) spawns a process, and then immediately returns to the next line of code execution. This isn't a problem, really. The problem comes about, when you want to WAIT for a spawned process to finish, before spawning a new process. For example, if I wanted to spawn notepad, and a calculator at the same time, this code would work (technically, it's not at the same time, but it's one immediately after the other, and doesn't wait.... so it appears to be at the same time):

shell "c:\windows\notepad.exe"
shell "c:\windows\system32\calc.exe"

What I am Tring To Do Is to have this program install the windows updates like
Update for WMDRM-enabled Media Players (KB902344)
Update for Windows XP (KB904942)
Windows Genuine Advantage Notification (KB905474)
Update for Windows XP (KB900485)
Security Update for Windows XP (KB913580)
Windows Malicious Software Removal Tool - May 2006 (KB890830)


One after the other so that i can maybe one after the other because i don't want windows to say that there is another program running please wait until it installs. Is it possible to write this in a batch file, or something like an Command line file so that it will execute line by line? If not could you give me an idea on how to get this done so they is no conflict.

Ok, I'm not clear on what you are doing really. I understand that you want to install the updates, 1 by 1..... but when does windows conflict? What's the problem? Do you know the commandline needed to launch the updates you want to launch? Doing this in a batch file is possible, (assuming I understand exactly what you are doing), but I don't see the pro's of using a batch versus a VB program.....

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.