473,385 Members | 1,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Running other apps from my code

Hey there, I have a question maybe you guys can help with:

Couple quick things:
1. I am using windows XP.
2. I am using Dev C++ 4.

I want to make a "Desktop Manager" sort of thing. I am using switch statements to choose between different options, like, "What do you want to work on today? 1. School work. 2. Personal work.." etc.

So I wrote a couple of C++ programs that can help with my math homework etc. But another option I want on there is to run another program that's not C++. Say I wan't to continue typing a story I am writing in Microsoft Works or something, I want to be able to choose an option to type my story, then have it open up my story through microsoft works.

So, I think I saw something else on these forums about that, but when I tried those things they never worked. I tried using the system functions though I've heard those aren't the best. Then I heard that I couldn't open my story straight off the bat because it's not an executible program as in WksWP.exe (which should open, but doesn't work.)

So I want to know how I can open my story straight off, or even just the Word Proccessor. Here is what I've been messing around with. It runs the C++ program, but then a pop up says, "cannot find WksWP.exe..."

Expand|Select|Wrap|Line Numbers
  1. #include <iostream.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6.  
  7.       system("start WksWP.exe");
  8.  
  9.       system("PAUSE");
  10.       return 0;
  11. }
  12.  

So all in all, I just want to know if this is even possible to make work. Or if there is another #include file that will do it or something.

Thanks for reading through this, any help will be appreciated!
Sep 17 '07 #1
1 1139
sicarie
4,677 Expert Mod 4TB
The system() command should work, though I noticed that first, I don't believe you need 'start' in it, and second, you may need to use the absolute pathname ( "C:\Program Files\Works\WskWP.exe" for example) to the executable. Just running WksWP.exe will look in your local directory and in your path. If it's in your path, then just remove 'start' and it should work. If you do need to use the absolute path, you should also backwhack the slashes (put them twice), so "C:\\Program Files\\your location\\your exe" because the \ is considered an escape character, and needs to be put in twice to be recognized as a single slash.
Sep 17 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Plumer | last post by:
Good morning everyone, I am having difficulty distributing a Release version of an application. System info C# DOTNET, MDE 2002, Version 7.0.9466 .Net Framework, version 1.0.3705 My...
3
by: Michael Sherf | last post by:
I'm looking for "real life" experiences of companies running DB2 in an 24x7 OLTP environment. Seems like most folks are using DB2 for DSS applications, rather than OLTP. If your DB2 production...
7
by: Michael C | last post by:
Hi all, Just started having a problem with the IDE. When I try to 'start' code in the IDE the IDE locks up. It builds and re-builds OK, and I can run the generated EXE outside the IDE, but...
2
by: jjmraz | last post by:
Hi, I have a need to create an app that will check on my pc what apps are running and if one is found that shouldn't be running, shut it down. How can I do this in c# or what areas should I be...
2
by: Max | last post by:
I'm fairly new to distributing .NET applications, and so far no one is able to use the apps I create. They do run on all 3 of my machines. I include the dotnetfxredist with the setup files. One...
4
by: aph | last post by:
Hello. I'm sure this has been asked before, but I can't find an answer anywhere. I want to create a truly "dynamic" app which can get new functions "on-the-fly" and run them without having to...
1
by: Ben Fidge | last post by:
Can anyone shed some light on why compiling and running web-apps is so slow in VS2005. I have a solution with 3 web-apps, 20 or so library projects and several winforms apps. All in all it totals...
5
by: jeremy | last post by:
I have an ASP.Net 2.0 application running on Windows Server 2003. The application displays properly in Internet Explorer, however, when I use a browser control embedded in a .net form, I get an...
0
by: sillz | last post by:
On Apr 8, 2:00 pm, sillz <beth.sto...@gmail.comwrote: I never could get this to work. The oracle account tested fine. I ended up creating a new account in Windows with the right permissions...
5
by: HvLa | last post by:
I've just installed Visual Web developer 2008 and tried to run my first ASP.net web site. When I run it on my Vista Business PC I got an error "Page can not be displayed". What should I check to...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.