Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hi guys, how would i activate a

Status
Not open for further replies.

Komil13

Programmer
Sep 26, 2001
50
US
hi guys,

how would i activate a dos window, run a command, and then close that window using Visual Basic?
 
This has been discussed a number of times on this forum. Try doing a search for something like ShellAndWait, and you should find a number of solutions with example code.
 
hi SuperComputerRobot,

i would like to run the regsvr32 command to register and unregister dlls.
 
nope ... i want it to run in the background ...
 
Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long


ShellExecute(hwnd, "Open", "regsvr32 " & TxtDllName, "", App.Path, 1)
 
I tried that. It doesn't work. I was wondering if you know how to use ShellExecute() API function?
 
lol ... never mind the last message about using the ShellExecute() API ... sorry ....
 
hey,

the API declaration is giving me a compile error ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top