Hack Forums
[.NET] Whats wrong with this code...? (one line code, please help) - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] Whats wrong with this code...? (one line code, please help) (/showthread.php?tid=782601)



Whats wrong with this code...? (one line code, please help) - L3g1tWa5te - Oct 31, 2010

Code
System.Diagnostics.Process.Start("mbam.exe /update")

It keeps on saying its wrong when I can simply run it from the Run menu, but I can't do it in VB. Now thats just messed up. Can someone tell me whats wrong? I am trying to add a parameter! Something I am missing?...😭😖

Its suppose to Update Mbam.

Regards,
L3g1tWa5te


* - tflo - Oct 31, 2010

Code
System.Diagnostics.Process.Start(Chr(34) + "mbam.exe /update" + Chr(34))

Maybe?


* - L3g1tWa5te - Oct 31, 2010

(Oct 31, 2010 01:14 PM)Vanquish Wrote:  
Code
System.Diagnostics.Process.Start(Chr(34) + "mbam.exe /update" + Chr(34))

Maybe?

Ill try it, thanks for the response....


* - xxrangexx - Oct 31, 2010

What error do you get?
Try copy / pasting these (try each one not sure but worth a shot!)

Code
System.Diagnostics.Process.Start("mbam.exe/update")

Code
System.Diagnostics.Process.Start(mbam.exe /update)
(this this will work)
OR try to declare mbam.exe / update first.

E.G.
Dim mbam as mbam.exe /update


* - StarZ - Oct 31, 2010

(Oct 31, 2010 01:36 PM)xxrangexx Wrote:  What error do you get?
Try copy / pasting these (try each one not sure but worth a shot!)

Code
System.Diagnostics.Process.Start("mbam.exe/update")

Code
System.Diagnostics.Process.Start(mbam.exe /update)
(this this will work)
OR try to declare mbam.exe / update first.

E.G.
Dim mbam as mbam.exe /update

Failcode.

Dim MBAM As String = "C:\Path\To\mbam.exe /update"
Shell(MBAM)


* - xxrangexx - Oct 31, 2010

(Oct 31, 2010 01:51 PM)StarZ Wrote:  Failcode.

Dim MBAM As String = "C:\Path\To\mbam.exe /update"
Shell(MBAM)
I have been coding in VB for about two days, please do give me a break.
Regardless, I was on the right tracks.


* - ident - Oct 31, 2010

(Oct 31, 2010 01:56 PM)xxrangexx Wrote:  I have been coding in VB for about two days, please do give me a break.
Regardless, I was on the right tracks.

correction u beeen copying aned pasting


* - DatGuyYo - Oct 31, 2010

Code
Dim Proc As New Process
  Proc.StartInfo.Arguments = "/update"
  Proc.StartInfo.FileName = "C:\XXX\XXX\mbam.exe"
  Proc.Start()

If that does not work. PM me, I will assist you further.


* - L3g1tWa5te - Nov 20, 2010

it works, thanks StarZ

tooshawty


* - xSilent - Nov 20, 2010

Code
Process.Start("Whatever\mbam.exe", "/update")