Hi All,
Would anybody be able to post me the command used in vb.net to execute an
application from within the current application?
Thanks.
kd 13 3322
Hi,
Process.Start("C:\MyApp.exe")
Ken
--------------------------
"kd" wrote: Hi All,
Would anybody be able to post me the command used in vb.net to execute an application from within the current application?
Thanks. kd
Thanks
"Ken Tucker [MVP]" wrote: Hi,
Process.Start("C:\MyApp.exe")
Ken -------------------------- "kd" wrote:
Hi All,
Would anybody be able to post me the command used in vb.net to execute an application from within the current application?
Thanks. kd
Hi Ken,
How are the parameters passed to the exe?
Thanks.
kd
"Ken Tucker [MVP]" wrote: Hi,
Process.Start("C:\MyApp.exe")
Ken -------------------------- "kd" wrote:
Hi All,
Would anybody be able to post me the command used in vb.net to execute an application from within the current application?
Thanks. kd
KD,
Using the processInfo http://msdn.microsoft.com/library/de...classtopic.asp
\\\Notepad
Dim p As New Process
Dim pi As New ProcessStartInfo
pi.arguments = "c:\windows\win.ini"
pi.FileName = "notepad.exe"
p.startinfo = pi
p.Start()
///
I hope this helps?
Cor
"kd" <kd@discussions.microsoft.com> schreef in bericht
news:E8**********************************@microsof t.com... Hi Ken,
How are the parameters passed to the exe?
Thanks. kd
"Ken Tucker [MVP]" wrote:
Hi,
Process.Start("C:\MyApp.exe")
Ken -------------------------- "kd" wrote:
> Hi All, > > Would anybody be able to post me the command used in vb.net to execute > an > application from within the current application? > > Thanks. > kd
Thanks Ligthert.
The arguments for to execute my application contains a switch /S followed by
the argument. The following code however is failing. Dim p As New Process Dim pi As New ProcessStartInfo pi.arguments = "/S testarg" pi.FileName = "C:\Program files\MyApp\test.exe" p.startinfo = pi p.Start()
I am not sure if this is the correct way to pass multiple arguments!
Help is greatly appreciated.
kd
"Cor Ligthert" wrote:
KD,
Using the processInfo http://msdn.microsoft.com/library/de...classtopic.asp
\\\Notepad Dim p As New Process Dim pi As New ProcessStartInfo pi.arguments = "c:\windows\win.ini" pi.FileName = "notepad.exe" p.startinfo = pi p.Start() /// I hope this helps?
Cor "kd" <kd@discussions.microsoft.com> schreef in bericht news:E8**********************************@microsof t.com... Hi Ken,
How are the parameters passed to the exe?
Thanks. kd
"Ken Tucker [MVP]" wrote:
Hi,
Process.Start("C:\MyApp.exe")
Ken -------------------------- "kd" wrote:
> Hi All, > > Would anybody be able to post me the command used in vb.net to execute > an > application from within the current application? > > Thanks. > kd
"kd" <kd@discussions.microsoft.com> schrieb: Would anybody be able to post me the command used in vb.net to execute an application from within the current application?
\\\
Imports System.Diagnostics
..
..
..
Process.Start("notepad", """C:\Bla Bla\1.txt""")
///
- or -
\\\
Shell("notepad ""C:\Bla Bla\1.txt""", AppWinStyle.NormalFocus)
///
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Kd,
You can always try this from the (DOSbox) commandline.
When it does it like that, than this would do it in my opinion as well as
you wrote it.
Cor
Cor,
The command runs successfully when executed from the command window. But
fails when executed through the vb.net code.
kd
"Cor Ligthert" wrote: Kd,
You can always try this from the (DOSbox) commandline. When it does it like that, than this would do it in my opinion as well as you wrote it.
Cor
And what is the behaviour.
Did you try it with notepad in the same place?
(other arguments of course)
Cor
Cor,
Running notepad is working. Notepad.exe takes just one argument. So, does
IE. I was looking for any application that takes more than one argument,
along with switches, in order to test where the problem lies. If you do come
across any, please post it here, so that I can test it.
Regards.
kd.
"Cor Ligthert" wrote: And what is the behaviour.
Did you try it with notepad in the same place? (other arguments of course)
Cor
KD,
I checked it with this program and it did as expected.
\\\
Public Class KDtest
Public Shared Sub main(ByVal args() As String)
If args.Length > 0 Then
If args(0).ToUpper = "\S" Then
MessageBox.Show(args(1))
End If
Else
Dim p As New Process
Dim pi As New ProcessStartInfo
pi.Arguments = "\S Hello"
pi.FileName = "KD"
p.StartInfo = pi
p.Start()
End If
End Sub
End Class
///
I hope this helps?
Cor
"kd" <kd@discussions.microsoft.com> schrieb: Running notepad is working. Notepad.exe takes just one argument. So, does IE. I was looking for any application that takes more than one argument, along with switches, in order to test where the problem lies. If you do come across any, please post it here, so that I can test it.
Depending on the application, certain parameter values need to be put
between double quotes, for example, file names containing space characters.
Maybe this is causing your problem.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
The application is running successfully now.
Thanks Cor, your assistance was of great help.
kd.
"Cor Ligthert" wrote: KD,
I checked it with this program and it did as expected.
\\\ Public Class KDtest Public Shared Sub main(ByVal args() As String) If args.Length > 0 Then If args(0).ToUpper = "\S" Then MessageBox.Show(args(1)) End If Else Dim p As New Process Dim pi As New ProcessStartInfo pi.Arguments = "\S Hello" pi.FileName = "KD" p.StartInfo = pi p.Start() End If End Sub End Class ///
I hope this helps?
Cor This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: BK |
last post by:
Can someone point me to a code sample that illustrates executing long
running tasks (asynchronous) from a web application in ASP.NET? I assume
that Web Services might come into play at some point,...
|
by: chris.dunigan |
last post by:
I'm looking for an example of how to execute an existing DTS package
from an
ASP (VB)script and would appreciate any and all response. I don't
even
know if it's possible
Thanks
- Chuck...
|
by: rvdw |
last post by:
Hi All,
I've a serious problem with executing stored procedures (SQL2000) from
an Access db (version 97). After executing a stored procedure ,
msaccess hangs. The whole call to the procedure is...
|
by: Tony Liu |
last post by:
Hi, I want to get the name of the calling function of an executing function,
I use the StackTrace class to do this and it seems working. However, does
anyone think that there any side effect...
|
by: Chakkaradeep |
last post by:
Hi all,
i have written a Service,now i want to execute another application (for
eg;calc.exe) in the service....how will i perform it??...
i tried using this....
/**************Executing a...
| |
by: Jibey |
last post by:
Hello:
I'm facing a very strange problem.
When I run my Web application in Visual Studio.NET the Page_Load event is not executing. Other events like a Button_Click are executing.
It doesn't...
|
by: Peter Strøiman |
last post by:
Hi.
I have a web application that needs to run tasks at regular intervals. E.g.
it must send out emails every night to people who subscribe to that service.
I have come up with one solution,...
|
by: whidbeywave |
last post by:
Hello all,
Help me understanding this situtation. While debugging a scenario for
error 403.9 on IIS/XP Pro, I added two counters to perfmon app.I saw at
some point of time Session Active =0 , but...
|
by: Ryan.Mohammed |
last post by:
I have a problem where the code that serializes and deserializes an
object is actually not the start application but loaded by reflection
and located in a subdirectory of the start application.
...
|
by: Divakar |
last post by:
Hi,
How can we find which SQL statement is executing when "list application
show detail" shows "UOW Executing" against an application.
This topic was touched upon earlier by one of the member....
|
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,...
| |
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...
|
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...
|
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...
|
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,...
|
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...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |