![]() |
|
[VB.NET] Can VB.NET Run .BAT COmmands ? - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Coding (https://sinister.li/Forum-Coding) +--- Forum: Visual Basic & .NET Framework (https://sinister.li/Forum-Visual-Basic-NET-Framework) +--- Thread: [VB.NET] Can VB.NET Run .BAT COmmands ? (/Thread-VB-NET-Can-VB-NET-Run-BAT-COmmands) |
[VB.NET] Can VB.NET Run .BAT COmmands ? - H3ROiN - 05-06-2011 Like THe Title Said . The Commands , Code: @echo off
echo Created By katyholic Lauch CS 1.6 ?
pause
REGEDIT /S settings.reg
echo Launching Counter-Strike 1.6
cd root
call hl.exe -game cstrike
echo Done..
open www.facebook.comRE: [VB.NET] Can VB.NET Run .BAT COmmands ? - Coder-san - 05-06-2011 Either port that to VB.Net, or write a .bat file on runtime using IO.File.WriteAllText RE: [VB.NET] Can VB.NET Run .BAT COmmands ? - H3ROiN - 05-07-2011 i kinda suck at VB , tell me how to port ? RE: [VB.NET] Can VB.NET Run .BAT COmmands ? - Coder-san - 05-07-2011 Porting a code means re-writing code from language A to language B. Writing a .bat would be easier for you. Code: Dim strBAT As String = "@echo off" & _
"echo Created By katyholic Lauch CS 1.6 ?" & _
"pause" & _
"REGEDIT /S settings.reg" & _
"echo Launching Counter-Strike 1.6" & _
"cd(root)" & _
"call hl.exe -game cstrike" & _
"echo Done.." & _
"open www.facebook.com"
IO.File.WriteAllText(CurDir & "\test.bat", strBAT)
Process.Start(CurDir & "\test.bat")RE: [VB.NET] Can VB.NET Run .BAT COmmands ? - H3ROiN - 05-07-2011 ah , so thts the source if i want to run a .exe with .bat commands ? . nice , ily . i would write this in .bat but once in awhile people think its fun and start changing the src of the .bat from credits to me for the launcher , he writes his name . Thanks again . RE: [VB.NET] Can VB.NET Run .BAT COmmands ? - 1234hotmaster - 05-07-2011 (05-07-2011, 01:06 PM)Coder-san Wrote: Porting a code means re-writing code from language A to language B. hey coder wont that malfunction? cause i think you missed new lines ( correct me if i'm wrong )well this is what i think the correct one: Code: Dim strBAT As String = "@echo off" & vbnewline & _
"echo Created By katyholic Lauch CS 1.6 ?" & vbnewline & _
"pause" & vbnewline & _
"REGEDIT /S settings.reg" & vbnewline & _
"echo Launching Counter-Strike 1.6" & vbnewline & _
"cd(root)" & vbnewline & _
"call hl.exe -game cstrike" & vbnewline & _
"echo Done.." & vbnewline & _
"open www.facebook.com"
IO.File.WriteAllText(CurDir & "\test.bat", strBAT)
Process.Start(CurDir & "\test.bat")RE: [VB.NET] Can VB.NET Run .BAT COmmands ? - Coder-san - 05-07-2011 Yeah, forgot. I'd just add in the resources as text anyways. RE: [VB.NET] Can VB.NET Run .BAT COmmands ? - H3ROiN - 05-08-2011 (05-07-2011, 03:11 PM)1234hotmaster Wrote:(05-07-2011, 01:06 PM)Coder-san Wrote: Porting a code means re-writing code from language A to language B. erm , 1234hotmaster thanks (: , yours worked . now i can release the cs1.6 portable with DM (DeathMatch) and easy see enemy mods :p . |