running external exes from my form

jnash

Well-known member
Joined
Oct 20, 2006
Messages
111
Programming Experience
Beginner
VB.NET:
   System.Diagnostics.Process.Start("VBC.EXE /t:winexe /reference:System.dll,System.Windows.Forms.dll,System.Data.DLL,system.drawing.dll,AxInterop.WMPLib.dll,Interop.WMPLib.dll,AxInterop.ShockwaveFlashObjects.dll,Interop.ShockwaveFlashObjects.dll /out:" & formName & " " & "C:\Documents and Settings\halo9\Desktop\" & formName & ".vb")

im trying to get vbc to compile a file , but i get an error saying its not found

paths are set up for vbc , so i can type it any where and it will work ???

this is the above code that doesnt work
 
VB.NET:
process.start("C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\vbc.exe", "parameters here!")
 
thanks john

VB.NET:
 Process.Start("C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\vbc.exe", "/t:winexe /reference:System.dll,System.Windows.Forms.dll,System.Data.DLL,system.drawing.dll,AxInterop.WMPLib.dll,Interop.WMPLib.dll,AxInterop.ShockwaveFlashObjects.dll,Interop.ShockwaveFlashObjects.dll /out:hello C:\Documents and Settings\halo9\Desktop\hello.vb")

the command prompt comes up, but no exe's are produced??
 
Does the same command work from command prompt? I mean with spaces in parameter arguments without quoting them? I doubt it, for example normally C:\Documents and Settings\halo9\Desktop\hello.vb would be read as 3 arguments:
1. C:\Documents
2. and
3. Settings\halo9\Desktop\hello.vb

As for quoted "C:\Documents and Settings\halo9\Desktop\hello.vb" is normally one argument. Remember use 2 consecutive quote when using them inside an already quoted string.
 
Back
Top