Hi, I want to run a Command Task to connect to my VPN. It really annoys me to see the CMD Window after connecting to an RDP bc my VPN-Connections takes like 20 sec to complete… Is there any way of setting the arguments such as I don't have to see the CMD Window? I tried /min and all that stuff, but could not seem to get it to work. I would really appreciate if anyone has a nice and clean way of doing this without calling a 2nd Script.
Best Answer
T
Tom Dale
said
over 2 years ago
I found a Solution, just compile your own windows forms and call the *.bat in the load function. Example Code
private void Form1_Load(object sender, EventArgs e)
{
string[] args = Environment.GetCommandLineArgs();
this.WindowState = FormWindowState.Minimized;
Process process = new Process();
process.StartInfo.FileName = "Your_Bat_Name.bat";
process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
process.StartInfo.Arguments = args[1]; // arg[0] is the directory path
process.Start();
process.WaitForExit();
this.Close();
}
I forgot to mention that I am running a *.Bat as my Command-Task
Christoph Muehlberger
said
over 2 years ago
Hi Tom,
unfortunately, that's not possible within Royal TS, but could use a workaround, like SilentCMD ( https://github.com/stbrenner/SilentCMD ), or try out one of the options mentioned here:
Tom Dale
Hi, I want to run a Command Task to connect to my VPN. It really annoys me to see the CMD Window after connecting to an RDP bc my VPN-Connections takes like 20 sec to complete… Is there any way of setting the arguments such as I don't have to see the CMD Window? I tried /min and all that stuff, but could not seem to get it to work. I would really appreciate if anyone has a nice and clean way of doing this without calling a 2nd Script.
I found a Solution, just compile your own windows forms and call the *.bat in the load function. Example Code
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstTom Dale
I forgot to mention that I am running a *.Bat as my Command-Task
Christoph Muehlberger
Hi Tom,
unfortunately, that's not possible within Royal TS, but could use a workaround, like SilentCMD ( https://github.com/stbrenner/SilentCMD ), or try out one of the options mentioned here:
https://www.robvanderwoude.com/battech_hideconsole.php
Sorry to be the bearer of bad news!
Best regards,
Christoph
Tom Dale
I found a Solution, just compile your own windows forms and call the *.bat in the load function. Example Code
Christoph Muehlberger
Hi Tom,
that's great news, thanks for the follow-up.
If you need anything else, let us know, otherwise have a nice day!
Best regards,
Christoph
-
What happened to the forum?
-
About this Forum
-
Security Information
-
Supported Secure Gateway (SSH) ciphers
-
Why is no remote file browser in SCP available?
-
What encryption is used in the rtsz files when enabled?
-
Royal TS V4 License File
-
How to resolve RDP resolution issues in Windows 7 with high resolution screen
-
Auto Fill in web page connection
-
How to reference custom properties in tasks and templates?
See all 275 topics