trying to execute a simple command line, need help

  • Thread starter Thread starter CP11
  • Start date Start date
C

CP11

Newbie here.

I am used to using vbscript but trying vb.net in vs2003.

I am trying to add a button click event, like this:

Dim LaunchApp As Integer
LaunchApp = Shell("""c:\program files\myapp\bin\newapp.exe""
/cmdline http://myapps/file.asp /logon")
AppActivate(LaunchApp)

This variable works like a champ in vbscript but I can't figure out why
nothing happens with the button click, there is no error, but nothing
comes up. Ideas?
 
CP11,

I don't know either but this newsgroup is full of this kind of code.

\\\
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
 
Cor Ligthert said:
I don't know either but this newsgroup is full of this kind of code.

\\\
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()
////

.... or even shorter:

\\\
Process.Start("notepad.exe", "C:\WINDOWS\WIN.INI")
///
 
Back
Top