Knil92 Posted August 24, 2018 Posted August 24, 2018 Hey, I'm just messing around in visual studio and I've been trying to get an app to run cmd with some arugments without flashing up a cmd window. This is what I've got but I cant seem to get it working. If any one has any suggestions that would be awesome. Dim startInfo As New ProcessStartInfo With { .FileName = "cmd.exe", .Arguments = TextBox2.Text & " exit", .WindowStyle = ProcessWindowStyle.Hidden } Process.Start(startInfo)
Knil92 Posted August 24, 2018 Author Posted August 24, 2018 I found a way to do what I wanted by pumping the commands into a batch file and then running the batch file from a vbs file. The app runs the vbs file so no window pops up, and then the vbs file runs the batch file hidden, example of the vbs file below; CreateObject("Wscript.Shell").Run "cmd.bat", 0, False
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now