473,748 Members | 8,392 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1298
To run an app, look at ShellExecute
To get the path of the running executable, see GetModuleFileNa me

--
Regards,
Nish [VC++ MVP]
"DavideR" <Da*****@discus sions.microsoft .com> wrote in message
news:77******** *************** ***********@mic rosoft.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_INFORMA TION pi;
STARTUPINFO si;
memset( &pi, 0, sizeof(PROCESS_ INFORMATION) );
memset(&si, 0, sizeof(STARTUPI NFO));
si.cb= sizeof(STARTUPI NFO);
si.dwFlags = STARTF_USESHOWW INDOW;
si.wShowWindow = SW_SHOWNA ;
si.lpDesktop = "";
CreateProcess( NULL,
Assembly::GetEx ecutingAssembly ()->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*))"progpa th and name" all works!!
If i run
Console::writel ine(S"location{ 0{ =
",Assembly::Get ExecutingAssemb ly()->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 GetModuleFileNa me

--
Regards,
Nish [VC++ MVP]
"DavideR" <Da*****@discus sions.microsoft .com> wrote in message
news:77******** *************** ***********@mic rosoft.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
348
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 text/buttons to that effect. I would then like the program to launch after installation is complete. I have a few questions about this. Any help would be appreciated: 1. In the User Interface Editor, I added a RadioButtons dialog to the End
5
1103
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 talks were centered around using VS with SQL and BizTalk as expected, but I got a chance to talk to lots of experts and I came away with a couple of impressions: 1. I can't wait to start using VS 2005 as a C++ programming. The improvements to MFC...
2
1593
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 paste it into Microsoft Word. Then I want to double click on the diagram in Microsoft Word and have my paint program loaded with the drawing ready for editing. For this seemingly basic functionality, is there an example out there on how to do...
4
2891
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 run all from cd ... my idea is to put the bootstrapper as autorun on cd ... in MSDN i found a bootstrapper but it's for launch .msi package and not for .exe application .... thanks in advance for help .. andrew
5
2466
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 to initialize properly (08x0000003). Click on OK to terminate the application”. I get the same results when I right-click on application and choose Debug->Start New Instance. However, the same application runs without any errors if I use the...
1
2222
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 CLASSPATH variable. The program runs normally when I launch it in a unix shell. Now, I want to launch this JAVA program in a PHP program with system() function for example. I have an Apache server with PHP 4 who runs. The
5
1885
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 program). I can get the program to start using System.Diagnostics.Process.Start(@"C:\Program Files\Trillian\trillian.exe");
8
1988
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. I previously did this with a sleep at the first row of the source code, but this makes the process visible in the task manager's processes tab during the sleep (before the "real application" is actually running), and I dont want that.
1
1657
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 application. The application name is dynamic and is selected from table. WScript.Echo verifies that it is calling the correct application and the path statement is correct. Also the application does reside where I am calling it from. The code...
0
8830
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9544
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9324
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8243
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6074
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4606
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.