VB.NET Using a Binary File as a resource

  • Hello Guest! Welcome to ConsoleCrunch, to help support our site check out the premium upgrades HERE! to get exclusive access to our hidden content.
  • Unable to load portions of the website...
    If you use an ad blocker addon, you should disable it because it interferes with several elements of the site and blocks more than just adverts.
  • Read Rules Before Posting Post Virus Scans with every program.

1UP

Member
Oct 9, 2014
24
10
63
This was something I used in order to try and keep my programs down to 1 file. Instead of including a seperate file that handled the up******, I simply embedded it into the main program. To do this all I did was make it a resource and when I needed to use it I would write it out to the root directory that the program was in.

To add a file as a resource, right click your project and click properties.
resource1.png


Click on the Resources tab. On the top click on strings and select files. Drag and drop the file you want to include as the resource into this window.

resource2.png

Click save or save all.

Now when you decide you need to use that file you can write it out to a directory then run it.

Code:
IO.File.WriteAllBytes("./" & "Updater.exe", My.Resources.Updater)
Process.Start("Updater.exe")
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • @ lurch6661:
    hows it going man
  • @ QM|T_JinX:
    im good you
  • @ lurch6661:
    good as it gets lol
  • @ lurch6661:
    spending alot of time with gf its her time of the month
  • @ lurch6661:
    and she outta smokes
  • @ QM|T_JinX:
    hahahha
  • @ lurch6661:
    ahhhhh oooo
  • @ lurch6661:
    ol
  • @ QM|T_JinX:
    it is what it is bro
  • @ lurch6661:
    famous saying from a wise one
  • @ lurch6661:
    lol
  • @ QM|T_JinX:
    lol
  • Chat Bot:
    xoilaccouk7 is our newest member. Welcome!
  • Chat Bot:
    Christo has joined the room.
  • Chat Bot:
    QM|T_JinX has joined the room.
  • Chat Bot:
    ExcelUK is our newest member. Welcome!
  • Chat Bot:
    Reza684 is our newest member. Welcome!
  • @ lurch6661:
    zap
  • Chat Bot:
    xoilacad6 is our newest member. Welcome!
      Chat Bot: xoilacad6 is our newest member. Welcome!