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.










share|improve this question









New contributor




root_id is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • 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














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.










share|improve this question









New contributor




root_id is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • 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












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.










share|improve this question









New contributor




root_id is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











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






share|improve this question









New contributor




root_id is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




root_id is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 2 days ago









quant

1,0111825




1,0111825






New contributor




root_id is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 2 days ago









root_id

1




1




New contributor




root_id is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





root_id is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






root_id is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











  • 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










  • 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












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"""");





share|improve this answer




















  • 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











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);






root_id is a new contributor. Be nice, and check out our Code of Conduct.









 

draft saved


draft discarded


















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






























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"""");





share|improve this answer




















  • 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















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"""");





share|improve this answer




















  • 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













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"""");





share|improve this answer












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"""");






share|improve this answer












share|improve this answer



share|improve this answer










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

















  • 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











root_id is a new contributor. Be nice, and check out our Code of Conduct.









 

draft saved


draft discarded


















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.













 


draft saved


draft discarded














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














































































Popular posts from this blog

Use pre created SQLite database for Android project in kotlin

Darth Vader #20

Ondo