4 Replies - 291 Views - Last Post: 16 June 2012 - 09:33 AM Rate Topic: -----

#1 Pho3niX90  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 15-June 12

Question - Pass text/data to C# via cmd.exe

Posted 15 June 2012 - 11:33 AM

Hi,

I am new to the site, and new to C#.

What I need to know is how do I fetch code from the CMD.exe app? For example:

C:\appplication.exe /m texthere

I have tried searching Google, but only come up with questions how to pass commands to cmd.exe


Any help would be greatly appreciated.
Is This A Good Question/Topic? 0
  • +

Replies To: Question - Pass text/data to C# via cmd.exe

#2 ThrowsException  Icon User is offline

  • D.I.C Head

Reputation: 29
  • View blog
  • Posts: 73
  • Joined: 21-February 12

Re: Question - Pass text/data to C# via cmd.exe

Posted 15 June 2012 - 01:00 PM

What kind of application have you created? I'm assuming a Console application from the list of templates in Visual Studio.
Was This Post Helpful? 0
  • +
  • -

#3 Pho3niX90  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 15-June 12

Re: Question - Pass text/data to C# via cmd.exe

Posted 16 June 2012 - 08:37 AM

View PostThrowsException, on 15 June 2012 - 01:00 PM, said:

What kind of application have you created? I'm assuming a Console application from the list of templates in Visual Studio.


Thanks for your reply.

I actually found a messaging toolkit, and started on that, so what I wanted to do is build a qlikview app, that can send sms's to the relevant customers.

After digging all night I found a solution, to use args[0] and so fort, but I would rather want to use "app.exe /m message_here /d device_id" and so forth, rather than "app.exe message_here device_id"

and yes it's a console app.

Thanks
Was This Post Helpful? 0
  • +
  • -

#4 Momerath  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 809
  • View blog
  • Posts: 1,947
  • Joined: 04-October 09

Re: Question - Pass text/data to C# via cmd.exe

Posted 16 June 2012 - 09:25 AM

View PostPho3niX90, on 16 June 2012 - 08:37 AM, said:

After digging all night I found a solution, to use args[0] and so fort, but I would rather want to use "app.exe /m message_here /d device_id" and so forth, rather than "app.exe message_here device_id"

And what is stopping you from doing so? You'd get "/m", "message_here", "/d", and "device_id" in the args array.
Was This Post Helpful? 1
  • +
  • -

#5 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 5666
  • View blog
  • Posts: 22,509
  • Joined: 23-August 08

Re: Question - Pass text/data to C# via cmd.exe

Posted 16 June 2012 - 09:33 AM

http://commandlinear...s.codeplex.com/
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1