473,503 Members | 1,666 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 5943
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*****@charter.netschreef in bericht
news:Ab*****************@newsfe04.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.GetExecuting
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.GetExecuting
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
9808
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...
1
2087
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 =...
6
38437
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...
2
1752
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...
0
2221
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...
6
2622
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...
2
1813
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...
12
2458
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):...
5
4787
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...
0
7281
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,...
0
7334
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...
0
7462
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...
0
5579
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,...
1
5014
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...
0
3168
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...
0
3156
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
737
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
383
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.