|
-
Jul 23rd, 2011, 08:02 AM
#1
Thread Starter
New Member
exucte Command Prompt in fourm
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 ..
-
Jul 23rd, 2011, 08:33 AM
#2
Hyperactive Member
Re: exucte Command Prompt in fourm
vb Code:
Dim sMyCommand as String sMyCommand = "ipconfig" Shell "cmd /c " & sMyCommand , vbHide
-
Jul 23rd, 2011, 08:35 AM
#3
Hyperactive Member
Re: exucte Command Prompt in fourm
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
-
Jul 23rd, 2011, 08:45 AM
#4
Thread Starter
New Member
Re: exucte Command Prompt in fourm
its not working with me .. in which mode I have to run it ?
can you please show me ..
-
Jul 23rd, 2011, 11:58 AM
#5
Hyperactive Member
Re: exucte Command Prompt in fourm
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
-
Jul 23rd, 2011, 12:01 PM
#6
Hyperactive Member
Re: exucte Command Prompt in fourm
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
-
Jul 24th, 2011, 04:05 AM
#7
Re: exucte Command Prompt in fourm
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|