473,657 Members | 2,609 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Start exe in new process and pass a parameter?

From an executable that I have running, I would like to start a different
executable, and if possible, pass it the key of the row in a table to
display upon launch. Assume that I have written both executables in VB.NET.
What would be required in the way of startup code in the called executable?
Anyone got an example of code for the called executable.

Thanks in advance.
Dean S
Mar 31 '07 #1
4 5949
Dean,

One option among several is to use VB's Command function to retrieve the
command line argument used to start the executable.

Kerry Moorman
"Dean Slindee" wrote:
From an executable that I have running, I would like to start a different
executable, and if possible, pass it the key of the row in a table to
display upon launch. Assume that I have written both executables in VB.NET.
What would be required in the way of startup code in the called executable?
Anyone got an example of code for the called executable.

Thanks in advance.
Dean S
Mar 31 '07 #2

from the caller you would use process start with command line arguments
in the starting app you can use command to retrieve the values passed in as
arguments

HTH

Michel

"Dean Slindee" <sl*****@charte r.netschreef in bericht
news:Ab******** *********@newsf e04.lga...
From an executable that I have running, I would like to start a different
executable, and if possible, pass it the key of the row in a table to
display upon launch. Assume that I have written both executables in
VB.NET. What would be required in the way of startup code in the called
executable? Anyone got an example of code for the called executable.

Thanks in advance.
Dean S


Mar 31 '07 #3
On Fri, 30 Mar 2007 19:46:08 -0500, Dean Slindee wrote:
From an executable that I have running, I would like to start a different
executable, and if possible, pass it the key of the row in a table to
display upon launch. Assume that I have written both executables in VB.NET.
What would be required in the way of startup code in the called executable?
Anyone got an example of code for the called executable.

Thanks in advance.
Dean S
You can use Process.Start in combination with Assembly.GetExe cuting
assembly to relaunch the exe with different parameters
--
Bits.Bytes
http://bytes.thinkersroom.com
Mar 31 '07 #4
On Fri, 30 Mar 2007 19:46:08 -0500, Dean Slindee wrote:
From an executable that I have running, I would like to start a different
executable, and if possible, pass it the key of the row in a table to
display upon launch. Assume that I have written both executables in VB.NET.
What would be required in the way of startup code in the called executable?
Anyone got an example of code for the called executable.

Thanks in advance.
Dean S
You can use Process.Start in combination with Assembly.GetExe cuting
assembly to relaunch the exe with different parameters
--
Bits.Bytes
http://bytes.thinkersroom.com
Mar 31 '07 #5

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

Similar topics

75
9851
by: Beni | last post by:
I have been programming in C for about a year now. It sounds silly, but I never took the time to question why a C(or C++ or Java) program execution begins only at the main(). Is it a convention or is there some deeper underlying reason?
1
2096
by: Ashok Subramanian | last post by:
Hello, I am calling Process.Start from a C# code in the following way..where startInfo is the object containing the process information. try { Process installProc = null; installProc = Process.Start(startInfo); }
6
38448
by: James Li | last post by:
I need to run multiple .bat files(in specific order, sychronously) from my C# windows app. I also want to hide the DOS command window so that users don't see them. Basically my program lanches .bat file to do some installation, status of the installation will be displayed on the windows app, but don't want the dos window showed. I look at Microsoft.VisualBasic.Interaction.Shell, that Shell out command is asynchronous, right? If it...
2
1756
by: PAPutzback | last post by:
I am trying to decrpyt a gpg encrypted file but the process prompts for a password. The Process.start function is run in a service so I want to be able to pass the password without any user intervention. Thanks, Phil
0
2238
by: Sergistm | last post by:
Hello World, :D I have a problem that it is making me crazy, I hope you can help me. I'm trying to execute a .exe file with the Procces.Start, and there is no problem when the file is on my computer, the problem comes when the file is in a network drive. The most amazing thing is that in one computer I can execute my .Net program without problems independently if the file is
6
2630
by: somequestion | last post by:
there are some dos command < or > it can use like this if there is a batch file as sample.bat sample.bat < parameter sample.bat parameter result . i just wanna use this when i use Process.Start() method. but < is not recongnise a parameter . how can i do?
2
1820
by: Matt F | last post by:
I have a relatively long command that I'm attempting to get process.start to execute. When executing the command, I get a "The system cannot find the file specified" error. I've gone to the trouble of making sure the entire command is fully qualified etc. but the error still occurs. Here is the command (modified slightly of course) C:\Dev\\\bin\Debug\.exe /silent /type 1 /constr "Data Source=;Initial
12
2476
by: =?Utf-8?B?ZXAu?= | last post by:
What is preferred method to start an app process and then fill in form fields? The following prog does not compile (b/c AppActivate does not have the correct param): ---------------------------------------------------------------------------------------- Imports Microsoft.VisualBasic Imports System.Windows.Forms Imports System.Diagnostics Module Module1 Sub Main()
5
4801
by: sjoshi23 | last post by:
Hello I'm trying to start a remote desktop session using Process.Start but it keeps saying "File not found". The same cmd thru DOS window works fine. I used: C:\\WINDOWS\\system32\\mstsc.exe /v:SP3DLAB4 Any hints ?
0
8397
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8310
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
8827
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
8732
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
8503
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
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7333
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
6167
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
4158
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...

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.