C# open rasphone.exe with arguments
up vote
0
down vote
favorite
Can you find my problem?
I can't open rasphone.exe with the right arguments.
private void Button_Click_1(object sender, RoutedEventArgs e)
System.Diagnostics.ProcessStartInfo proc = new System.Diagnostics.ProcessStartInfo();
proc.FileName = @"C:windowssystem32cmd.exe";
proc.Arguments = @"C:WindowsSystem32rasphone.exe -d ""My VPN""";
System.Diagnostics.Process.Start(proc);
I also tried:
Process.Start(@"C:WindowsSystem32rasphone.exe", @" -d ""My VPN"" ");
Or:
System.Diagnostics.Process.Start(@"C:\Users\***\Documents\VPN Launcher\VPN Launcher\VPN Launcher\startVPN.bat");
In the .bat file:
start "" "C:WindowsSystem32rasphone.exe" -d "My VPN"
It opens the cmd/.bat but i dont open the rasphone.exe with the right arguments.
c# visual-studio parameters vpn openprocess
New contributor
|
show 1 more comment
up vote
0
down vote
favorite
Can you find my problem?
I can't open rasphone.exe with the right arguments.
private void Button_Click_1(object sender, RoutedEventArgs e)
System.Diagnostics.ProcessStartInfo proc = new System.Diagnostics.ProcessStartInfo();
proc.FileName = @"C:windowssystem32cmd.exe";
proc.Arguments = @"C:WindowsSystem32rasphone.exe -d ""My VPN""";
System.Diagnostics.Process.Start(proc);
I also tried:
Process.Start(@"C:WindowsSystem32rasphone.exe", @" -d ""My VPN"" ");
Or:
System.Diagnostics.Process.Start(@"C:\Users\***\Documents\VPN Launcher\VPN Launcher\VPN Launcher\startVPN.bat");
In the .bat file:
start "" "C:WindowsSystem32rasphone.exe" -d "My VPN"
It opens the cmd/.bat but i dont open the rasphone.exe with the right arguments.
c# visual-studio parameters vpn openprocess
New contributor
Why don't you launch rasphone.exe directly ? Do you absolutely need to get through the command line before ?
– Muldec
2 days ago
No, but it dont work. I tried it ( Process.Start(@"C:WindowsSystem32rasphone.exe", @" -d ""My VPN"" "); )
– root_id
2 days ago
Does rasphone starts when you try to launch manually with that command line ?
– Muldec
2 days ago
Yes, it also starts when I start it with the batch-file or through the command line but it dont start while debugging
– root_id
2 days ago
Are you absolutely sure that rasphone is not starting ? I mean do you keep your application running to ensure that the process you launched keeps running ?
– Muldec
2 days ago
|
show 1 more comment
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Can you find my problem?
I can't open rasphone.exe with the right arguments.
private void Button_Click_1(object sender, RoutedEventArgs e)
System.Diagnostics.ProcessStartInfo proc = new System.Diagnostics.ProcessStartInfo();
proc.FileName = @"C:windowssystem32cmd.exe";
proc.Arguments = @"C:WindowsSystem32rasphone.exe -d ""My VPN""";
System.Diagnostics.Process.Start(proc);
I also tried:
Process.Start(@"C:WindowsSystem32rasphone.exe", @" -d ""My VPN"" ");
Or:
System.Diagnostics.Process.Start(@"C:\Users\***\Documents\VPN Launcher\VPN Launcher\VPN Launcher\startVPN.bat");
In the .bat file:
start "" "C:WindowsSystem32rasphone.exe" -d "My VPN"
It opens the cmd/.bat but i dont open the rasphone.exe with the right arguments.
c# visual-studio parameters vpn openprocess
New contributor
Can you find my problem?
I can't open rasphone.exe with the right arguments.
private void Button_Click_1(object sender, RoutedEventArgs e)
System.Diagnostics.ProcessStartInfo proc = new System.Diagnostics.ProcessStartInfo();
proc.FileName = @"C:windowssystem32cmd.exe";
proc.Arguments = @"C:WindowsSystem32rasphone.exe -d ""My VPN""";
System.Diagnostics.Process.Start(proc);
I also tried:
Process.Start(@"C:WindowsSystem32rasphone.exe", @" -d ""My VPN"" ");
Or:
System.Diagnostics.Process.Start(@"C:\Users\***\Documents\VPN Launcher\VPN Launcher\VPN Launcher\startVPN.bat");
In the .bat file:
start "" "C:WindowsSystem32rasphone.exe" -d "My VPN"
It opens the cmd/.bat but i dont open the rasphone.exe with the right arguments.
c# visual-studio parameters vpn openprocess
c# visual-studio parameters vpn openprocess
New contributor
New contributor
edited 2 days ago
quant
1,0111825
1,0111825
New contributor
asked 2 days ago
root_id
1
1
New contributor
New contributor
Why don't you launch rasphone.exe directly ? Do you absolutely need to get through the command line before ?
– Muldec
2 days ago
No, but it dont work. I tried it ( Process.Start(@"C:WindowsSystem32rasphone.exe", @" -d ""My VPN"" "); )
– root_id
2 days ago
Does rasphone starts when you try to launch manually with that command line ?
– Muldec
2 days ago
Yes, it also starts when I start it with the batch-file or through the command line but it dont start while debugging
– root_id
2 days ago
Are you absolutely sure that rasphone is not starting ? I mean do you keep your application running to ensure that the process you launched keeps running ?
– Muldec
2 days ago
|
show 1 more comment
Why don't you launch rasphone.exe directly ? Do you absolutely need to get through the command line before ?
– Muldec
2 days ago
No, but it dont work. I tried it ( Process.Start(@"C:WindowsSystem32rasphone.exe", @" -d ""My VPN"" "); )
– root_id
2 days ago
Does rasphone starts when you try to launch manually with that command line ?
– Muldec
2 days ago
Yes, it also starts when I start it with the batch-file or through the command line but it dont start while debugging
– root_id
2 days ago
Are you absolutely sure that rasphone is not starting ? I mean do you keep your application running to ensure that the process you launched keeps running ?
– Muldec
2 days ago
Why don't you launch rasphone.exe directly ? Do you absolutely need to get through the command line before ?
– Muldec
2 days ago
Why don't you launch rasphone.exe directly ? Do you absolutely need to get through the command line before ?
– Muldec
2 days ago
No, but it dont work. I tried it ( Process.Start(@"C:WindowsSystem32rasphone.exe", @" -d ""My VPN"" "); )
– root_id
2 days ago
No, but it dont work. I tried it ( Process.Start(@"C:WindowsSystem32rasphone.exe", @" -d ""My VPN"" "); )
– root_id
2 days ago
Does rasphone starts when you try to launch manually with that command line ?
– Muldec
2 days ago
Does rasphone starts when you try to launch manually with that command line ?
– Muldec
2 days ago
Yes, it also starts when I start it with the batch-file or through the command line but it dont start while debugging
– root_id
2 days ago
Yes, it also starts when I start it with the batch-file or through the command line but it dont start while debugging
– root_id
2 days ago
Are you absolutely sure that rasphone is not starting ? I mean do you keep your application running to ensure that the process you launched keeps running ?
– Muldec
2 days ago
Are you absolutely sure that rasphone is not starting ? I mean do you keep your application running to ensure that the process you launched keeps running ?
– Muldec
2 days ago
|
show 1 more comment
1 Answer
1
active
oldest
votes
up vote
0
down vote
Welcome to StackOverflow. As docs said, you need to escape double-quotas with 3 double-quotas:) I don't know why it is mandatory, but this should work:
Process.Start(@"C:WindowsSystem32rasphone.exe", "-d """My VPN"""");
It's a step forward :) But I get the message: "Command Prompt for the dial-up network" with some arguments/informations. But nothing to login.
– root_id
2 days ago
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Welcome to StackOverflow. As docs said, you need to escape double-quotas with 3 double-quotas:) I don't know why it is mandatory, but this should work:
Process.Start(@"C:WindowsSystem32rasphone.exe", "-d """My VPN"""");
It's a step forward :) But I get the message: "Command Prompt for the dial-up network" with some arguments/informations. But nothing to login.
– root_id
2 days ago
add a comment |
up vote
0
down vote
Welcome to StackOverflow. As docs said, you need to escape double-quotas with 3 double-quotas:) I don't know why it is mandatory, but this should work:
Process.Start(@"C:WindowsSystem32rasphone.exe", "-d """My VPN"""");
It's a step forward :) But I get the message: "Command Prompt for the dial-up network" with some arguments/informations. But nothing to login.
– root_id
2 days ago
add a comment |
up vote
0
down vote
up vote
0
down vote
Welcome to StackOverflow. As docs said, you need to escape double-quotas with 3 double-quotas:) I don't know why it is mandatory, but this should work:
Process.Start(@"C:WindowsSystem32rasphone.exe", "-d """My VPN"""");
Welcome to StackOverflow. As docs said, you need to escape double-quotas with 3 double-quotas:) I don't know why it is mandatory, but this should work:
Process.Start(@"C:WindowsSystem32rasphone.exe", "-d """My VPN"""");
answered 2 days ago
vasily.sib
1,4821716
1,4821716
It's a step forward :) But I get the message: "Command Prompt for the dial-up network" with some arguments/informations. But nothing to login.
– root_id
2 days ago
add a comment |
It's a step forward :) But I get the message: "Command Prompt for the dial-up network" with some arguments/informations. But nothing to login.
– root_id
2 days ago
It's a step forward :) But I get the message: "Command Prompt for the dial-up network" with some arguments/informations. But nothing to login.
– root_id
2 days ago
It's a step forward :) But I get the message: "Command Prompt for the dial-up network" with some arguments/informations. But nothing to login.
– root_id
2 days ago
add a comment |
root_id is a new contributor. Be nice, and check out our Code of Conduct.
root_id is a new contributor. Be nice, and check out our Code of Conduct.
root_id is a new contributor. Be nice, and check out our Code of Conduct.
root_id is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53223933%2fc-sharp-open-rasphone-exe-with-arguments%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Why don't you launch rasphone.exe directly ? Do you absolutely need to get through the command line before ?
– Muldec
2 days ago
No, but it dont work. I tried it ( Process.Start(@"C:WindowsSystem32rasphone.exe", @" -d ""My VPN"" "); )
– root_id
2 days ago
Does rasphone starts when you try to launch manually with that command line ?
– Muldec
2 days ago
Yes, it also starts when I start it with the batch-file or through the command line but it dont start while debugging
– root_id
2 days ago
Are you absolutely sure that rasphone is not starting ? I mean do you keep your application running to ensure that the process you launched keeps running ?
– Muldec
2 days ago