473,382 Members | 1,165 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,382 software developers and data experts.

launch program vc++.net

How to launch a exe in a vc++ 2002 program?
What is the equivalent of vb6's app.path?
How can i get the exe name?
Thanks
davide
Dec 5 '05 #1
2 1279
To run an app, look at ShellExecute
To get the path of the running executable, see GetModuleFileName

--
Regards,
Nish [VC++ MVP]
"DavideR" <Da*****@discussions.microsoft.com> wrote in message
news:77**********************************@microsof t.com...
How to launch a exe in a vc++ 2002 program?
What is the equivalent of vb6's app.path?
How can i get the exe name?
Thanks
davide

Dec 5 '05 #2
Thanks for reply
I'm using Vs2002 .net framvwork sp3
Really I need to rerun my exe
(in shellexecute i had compiling problem so
viewing helps
I use that:
PROCESS_INFORMATION pi;
STARTUPINFO si;
memset( &pi, 0, sizeof(PROCESS_INFORMATION) );
memset(&si, 0, sizeof(STARTUPINFO));
si.cb= sizeof(STARTUPINFO);
si.dwFlags = STARTF_USESHOWWINDOW;
si.wShowWindow = SW_SHOWNA ;
si.lpDesktop = "";
CreateProcess( NULL,
Assembly::GetExecutingAssembly()->Location,
NULL,
NULL,
FALSE,
NORMAL_PRIORITY_CLASS,
NULL,
NULL,
&si,
&pi );
and i receive the following error
unable to convert parameter 2 from system::string__gc* to LPSTR
If i Put in the second parameter (char*))"progpath and name" all works!!
If i run
Console::writeline(S"location{0{ =
",Assembly::GetExecutingAssembly()->Location
I view the correct path
That's a conversion Problem i thing but i don't Know how to solve
thanks best
regards
"Nishant Sivakumar" wrote:
To run an app, look at ShellExecute
To get the path of the running executable, see GetModuleFileName

--
Regards,
Nish [VC++ MVP]
"DavideR" <Da*****@discussions.microsoft.com> wrote in message
news:77**********************************@microsof t.com...
How to launch a exe in a vc++ 2002 program?
What is the equivalent of vb6's app.path?
How can i get the exe name?
Thanks
davide


Dec 6 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jeff Cooper | last post by:
Hi folks, I have a small VB app and I've created a deployment project for it. At the end of installation I would like the user to get a prompt like "Run your new program now? yes/no" -- or...
5
by: Tom Serface | last post by:
I attended the VS Launch in San Francisco yesterday. To be fair, the launch was shared with SQL Server 2005 and BizTalk 2006, but I was mostly interested in Visual Studio. Most of the special...
2
by: Peter Ignarson | last post by:
Hi there - I am writing a paint program (I am following a learning tutorial, there is no point to writing a paint program) and I want to extend it so that I can copy the contents of my drawing and...
4
by: Andrew | last post by:
hi, i'm searching for a bootstrapper that check if .net framework is installed on a machine and after the install launch my vb.net app ... i dont want to installa the app on the pc but i want to...
5
by: thomas1107 | last post by:
I am running Visual Studio .NET 2002 Professional on Windows 2000 SP4. When I try to launch the debugger from inside the IDE for VC++ applications I get the following error “Application failed...
1
by: sylsau | last post by:
Hello, I wrote a JAVA program which uses the JAVA API JDOM 1.0 (of this site www.jdom.org) I put the archive jdom.jar in the directory /usr/share/java/jdom.jar and I added this path in the...
5
by: jmsxp | last post by:
Hi all, I am in my infancy with programming, so please forgive stupid questions... I am attempting to write a C# program that will launch Trillian (well, that is just a part of the overall...
8
by: Marcus | last post by:
I have this application I have made that I launch when the user logs into Windows XP. I would like to delay the launch of the application so that it starts 1 minute after the user has logged in. ...
1
BezerkRogue
by: BezerkRogue | last post by:
I have created a VB Script to synchronize software versions and then launch an application on the system it is run against. The script runs and generates no errors but will not launch the second...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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: 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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.