![]() |
|
[.NET] Need help running a silent CMD command (Shell is not working) - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] Need help running a silent CMD command (Shell is not working) (/showthread.php?tid=4650900) |
Need help running a silent CMD command (Shell is not working) - Mr Fox - Jan 23, 2015 Alright I need when a button is pressed it runs the commands "start <application.exe> <IP> <Port>" However I want it to run silently. When I try opening CMD and inputting the command, it goes through however it opens the window (I tried using taskkill afterwards but I would highly prefer it being 100% silent). When I try using Shell it make the defualt directory system32 so when it runs the "start <Application.exe> <IP> <Port>" it cannot find the specified application. Is there anyway to get shell to read from the current directory? * - Zyklon A - Jan 23, 2015 PHP Code This should work! * - Mr Fox - Jan 23, 2015 (Jan 23, 2015 12:04 PM)Deodorant Wrote: The application needs to be run with the Args. Or I'll get an error since once the application initializes it ignores the cmd args * - Odus - Jan 23, 2015 Like this? ![]() Code: Code Dim p As New ProcessStartInfo("C:\Users\Odus\Desktop\VBConsole.exe", "hello") 'With {.WindowStyle = ProcessWindowStyle.Hidden, .CreateNoWindow = True}* - Mr Fox - Jan 23, 2015 (Jan 23, 2015 01:43 PM)Odus Wrote: Like this? instead of Code C:\Users\Odus\Desktop\VBConsole.exeI need to have it in the files location * - Odus - Jan 23, 2015 (Jan 23, 2015 02:02 PM)etc. Wrote: instead of Replace with: Code AppDomain.CurrentDomain.BaseDirectory & "whatever.exe" |