|
-
Aug 6th, 2003, 08:07 PM
#1
Thread Starter
New Member
Just how to execute a file?
Someone, please post some vb.net code, on how to execute a file, without the full path. Like if my program is at D:\Program\program.exe, and it has to execute the file that's in D:\Program\data\file.exe , just with a click of a button.
Normally that would just be data/file.exe....
Many thanks in advance.
"Tickets? Since when did they start charging for the bus? Didn't we used to ride that **** to school every morning for free?" - Jay
-
Aug 6th, 2003, 08:20 PM
#2
VB Code:
process.start("hello.exe")
If it doesn't work, you may need to reference another object or use the full class path... or whatever it's called.. it's like
system.diagnostics.process.start()
-
Aug 6th, 2003, 08:26 PM
#3
Thread Starter
New Member
Re: Just how to execute a file?
Originally posted by fwm
Someone, please post some vb.net code, on how to execute a file, without the full path. Like if my program is at D:\Program\program.exe, and it has to execute the file that's in D:\Program\data\file.exe , just with a click of a button.
Normally that would just be data/file.exe....
Many thanks in advance.
Yeah, that worked. Thank you much
"Tickets? Since when did they start charging for the bus? Didn't we used to ride that **** to school every morning for free?" - Jay
-
Aug 6th, 2003, 08:40 PM
#4
Re: Re: Just how to execute a file?
Originally posted by fwm
Yeah, that worked. Thank you much

np but you kind of thanked yourself.... lol
-
Aug 6th, 2003, 08:46 PM
#5
Thread Starter
New Member
Re: Re: Re: Just how to execute a file?
"Tickets? Since when did they start charging for the bus? Didn't we used to ride that **** to school every morning for free?" - Jay
-
Aug 6th, 2003, 09:54 PM
#6
Thread Starter
New Member
Dammit
Ok, I tested this on a clean form, with only one button and that command.
But then when I added groupboxes, labels, pictureboxes, it's now giving my this error:
Process.start("hello.exe")
'start' is not a member of 'System.Windows.Forms.GroupBox'.
I think that's wierd. It worked perfect before I started adding controls to the form!
"Tickets? Since when did they start charging for the bus? Didn't we used to ride that **** to school every morning for free?" - Jay
-
Aug 6th, 2003, 10:35 PM
#7
Sounds like you put the code on the wrong object (a groupbox)
-
Aug 6th, 2003, 10:37 PM
#8
Thread Starter
New Member
Originally posted by kasracer
Sounds like you put the code on the wrong object (a groupbox)
Negative, I have the code like this:
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Process.Start("hello")
End Sub
"Tickets? Since when did they start charging for the bus? Didn't we used to ride that **** to school every morning for free?" - Jay
-
Aug 6th, 2003, 11:02 PM
#9
Thread Starter
New Member
Hey, I figured it out. I'm just using this, and then it works:
Dim Alarm As Process = New Process
Alarm.Start("hello.exe")
"Tickets? Since when did they start charging for the bus? Didn't we used to ride that **** to school every morning for free?" - Jay
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|