Jump to content
UBot Underground

Plugin: Shell Command Issues


Recommended Posts

So I am having issues keeping the spaces in a shell command.

            string location = parameters["location"];
            System.Diagnostics.Process.Start("CMD.exe", ("/C" + @location + " /connect"));

 

Every time I run the command it says that it cannot find a specific path which usually ends on "C:/Program" (assuming it is not using the spaces)
I read a lot on google about this but nothing seems to work. They recommend adding a "@" before the string of text but I'm using a string name instead of just plain words. (like /connect)
 
Any ideas?
 
Got it
 
            System.Diagnostics.Process.Start("CMD.exe", "/C \"" + @location + "\" /connect");
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...