Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Help: Executing MS-Dos Prompt command by code

I'm using MS Access, so the clients doesn't has the COM. But i have the files on my server, so what i want to make is, every time the program start it will check does the clients has registered the COM if no errors then continues, else the program will execute the code that execute the string variable:
"RegSvr32 \\server\****.ocx" to the Command Prompt.

How can i make code that like executing MS-Dos Prompt. Thanks for any kind of help.
[462 byte] By [me_code2004] at [2007-11-11 6:49:01]
# 1 Re: Help: Executing MS-Dos Prompt command by code
Have you tried the Shell function?
http://msdn.microsoft.com/library/en-us/vbenlr98/html/vafctShell.asp
Phil Weber at 2007-11-11 17:27:48 >
# 2 Re: Help: Executing MS-Dos Prompt command by code
Do you mean i activate CMD and then use SendKeys method to the CMD apps?
me_code2004 at 2007-11-11 17:28:59 >
# 3 Re: Help: Executing MS-Dos Prompt command by code
No. You can run:

Shell "RegSvr32 \\server\filename.ocx"

to register the component from within your app.
Phil Weber at 2007-11-11 17:29:58 >