Support Forums

Full Version: How do you get CMD to come up with vb6?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
ok i went to access, made a button which opens vb6. what do i do in vb6 to get cmd? i need this for school as they have blocked .bat and .exe files.

Thanks
I don't really know VB6 but I used google and found this which might help you..
Code:
Dim sYourCommand as String
sYourCommand = "\networkfolder\project\testfile.txt"
Shell "cmd /c " & sYourCommand

In this example, you would create a textfile which included a command that you want to run on the CMD.
sYourCommand = "\LOCATION\yourcommand.txt"
Next line of code would then open the cmd and run the command..

Alternatively you could just do
Code:
Shell("cmd.exe")

I'm not entirely sure this correct as I don't code in VB6 but I hope this helps.
(05-16-2010, 05:51 AM)Dubstep Wrote: [ -> ]Alternatively you could just do
Code:
Shell("cmd.exe")
Or if this doesn't work:
Code:
Shell "C:\Windows\system32\cmd.exe"
Shell "C:\Windows\system32\cmd.exe"


I think that is it Tongue Not positive though.