Guy's
I want to execute come command like ipconfig from my form as Command Prompt
Can any one help me in this ..
From Picture tool or Text tool .. Pls advice .. :wave:
Printable View
Guy's
I want to execute come command like ipconfig from my form as Command Prompt
Can any one help me in this ..
From Picture tool or Text tool .. Pls advice .. :wave:
vb Code:
Dim sMyCommand as String sMyCommand = "ipconfig" Shell "cmd /c " & sMyCommand , vbHide
This code is supposed to launch the command prompt with a hidden way (cuz there is the attribute vbhidden), and it will launch the ipconfig (or any other command dos you type in the sMyCommand)
In case you need to see the dos command prompt than don't use the vbhide
its not working with me .. in which mode I have to run it ?
can you please show me ..
I am sure that it's working, but it's hidden so you don't see it !!!! You said you want to be able to launch the command that you can excecute from VB and i told you how !! now it depends on your command, the code I gave you works fine !!!
Try from your vb things like the following and you will see that it's working !!
vb Code:
Shell ("calc.exe") 'to run calculator Shell ("cmd.exe") 'to run command prompt or Shell "C:\Windows\system32\cmd.exe", vbNormalFocus 'to run command prompt with a different way
if you still consider it not working, than maybe I didn't understand your needs I am sorry and I hope that someone else will get exactly what you want and that will provide necessary help
this execute ipconfig/all, u can change the commands, justgreat already posted for u.
Code:Private Sub Command1_Click()
Shell "cmd.exe /k ipconfig/all", vbNormalFocus
End Sub