Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

DOS commands in a program


  • This topic is locked This topic is locked

#1
EMDF

EMDF

    Member

  • Member
  • PipPipPip
  • 140 posts
I was wondering if there was a way to run DOS commands in a program. Like for instance, let's say I want to make a network tester, and that would ping the router to see if it responds, then it would ping a website (actually, I wanted to do something else with DOS, but I'm not mentioning it). Is there any way I can write a program that interacts with DOS on it's own, without user input?

I'm thinking possibly C++.NET, maybe even VB.NET (although I highly doubt VB would work with dos). If this is possible, what language would be best to use, and how would I go about doing this?

The only programming software I have is Visual Studio .NET 2003 and notepad (I can find compilers if I have to).

Thanks in advance!
-EMDF
  • 0

Advertisements


#2
stettybet0

stettybet0

    Trusted Tech

  • Technician
  • 2,579 posts
Assuming that by "DOS", you mean Command Prompt... It is definitely possible to do this in C++, and almost certainly possible to do in VB.NET. However, why not just write a batch script? That is the easiest way to do what you want...
  • 0

#3
EMDF

EMDF

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 140 posts

Assuming that by "DOS", you mean Command Prompt... It is definitely possible to do this in C++, and almost certainly possible to do in VB.NET. However, why not just write a batch script? That is the easiest way to do what you want...

Yes, i meant Command prompt (forgot it was called that).
The two reasons I don't want to do a batch script is that 1) I don't know how to write batch scripts and 2) I wanted a gui for it.

Whichever way requires less code is the one I want to write it in.

If I end up writing a .bat file to do what I want, can I make a C++/VB.NET program to run the .bat, or would it be more efficient to write it all in C++/VB.NET ?
  • 0

#4
stettybet0

stettybet0

    Trusted Tech

  • Technician
  • 2,579 posts
Well, can you tell me what exactly you are trying to do in command prompt with this program you will be making?
  • 0

#5
EMDF

EMDF

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 140 posts
I'm trying to embed files in images, using the EMBED command, as I haven't seen any other programs that do that
  • 0

#6
stettybet0

stettybet0

    Trusted Tech

  • Technician
  • 2,579 posts
Edit:removed advice that could be helpfull to the OP
  • 0

#7
EMDF

EMDF

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 140 posts
it's actually not a 3rd party command, but I still want to have a gui for it
  • 0

#8
dsenette

dsenette

    Je suis Napoléon!

  • Community Leader
  • 26,047 posts
  • MVP
why exactly are you wanting to embed a file in an image anyway? might help with deciding on the proper method for doing it
  • 0

#9
EMDF

EMDF

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 140 posts
for one of the websites I go to. it's very popular there.
  • 0

#10
dsenette

dsenette

    Je suis Napoléon!

  • Community Leader
  • 26,047 posts
  • MVP
that's not a good enough answer..."for one of those websites...it's popular" tells me nothing...what are you trying to embed in an image and why are you trying to do it?
  • 0

#11
EMDF

EMDF

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 140 posts
it's an imageboard website and it filters almost all file host websites, so the most popular way to pass files around is to embed them in images
  • 0

#12
dsenette

dsenette

    Je suis Napoléon!

  • Community Leader
  • 26,047 posts
  • MVP
ok...so you're attempting to get around a "banned action" on another website....as in...it's explicitly against their rules for you to transfer files using their website?(i would imagine you're embedding music or something else you shouldn't be passing around anyway)
good try

We here at Geeks To Go cannot help you get around any sort of administrative restrictions imposed on a School, Work, or any other network not owned and operated by yourself. These restrictions can include (but are not limited to): Website Blocking policies, Software Installation policies, Email retention policies, Software Configuration policies, Network/Internet usage policies, Network Configuration policies, Forum or Chat Room Bans, Game Server Bans, or any other actions that are deemed "unauthorized" by the owners/administrators of the network in question. Any actions by members of the Geeks To Go site that would be offered to help in this manner would directly violate the http://www.geekstogo...?act=boardrules" target="_blank"> TOS of this site.

If you have any issues with this policy please PM a Moderator or Admin.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP