Results 1 to 3 of 3
  1. #1
    ajvpot's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Posts
    139
    Reputation
    10
    Thanks
    39

    [SOURCE CODE]Write File To Disk From Resources[VB.NET]

    Just add your file to the resources of the project and declare the resource in your variables.

    Code:
            '''''''''''''''''''''''''''''''''''
            '''''''Declare variables     ''''''
            '''''''''''''''''''''''''''''''''''
            Dim newFilePath As String
            Dim resource As Array
            '''''''''''''''''''''''''''''''''''
            '''''''Put data in variables'''''''
            '''''''''''''''''''''''''''''''''''
            newFilePath = "C:/test/test.ext" 'your file path (string)
            resource = My.Resources.something ' resouce=YOUR RESOURCE  my.resources.something
            '''''''''''''''''''''''''''''''''''
            '''''''Write file           '''''''
            '''''''''''''''''''''''''''''''''''
            Using sCreateFile As New IO.FileStream(newFilePath, IO.FileMode.Create)
                sCreateFile.Write(resource, 0, resource.Length)
            End Using
            '''''''''''''''''''''''''''''''''''
            '''''''DONE!                '''''''
            '''''''''''''''''''''''''''''''''''
    you can make it write to the temp directory with this code

    Code:
            Dim temppath
            temppath = If(Environ$("tmp") <> "", Environ$("tmp"), Environ$("temp"))
    newFilePath = temppath + "/file.ext"
    Hope this helps someone
    [IMG]https://************.com/sig/020/ajvpot.jpg[/IMG]
    [img]https://************.com/sig/020/Bommer.jpg[/img]
    ^^LEGIT ACCOUNTS ^^
    [IMG]https://************.com/sig/020/banned2m0rr0.jpg[/IMG]
    ^^HACKER ACCOUNT^^

  2. #2
    Zoom's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    Your going on my 24/7 DDoS hit list.
    Posts
    8,552
    Reputation
    127
    Thanks
    5,970
    My Mood
    Happy
    Just remember to give credits.

  3. #3
    ajvpot's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Posts
    139
    Reputation
    10
    Thanks
    39
    To whom? I made this, just not the temp directory finder thingy... I cant edit my post
    [IMG]https://************.com/sig/020/ajvpot.jpg[/IMG]
    [img]https://************.com/sig/020/Bommer.jpg[/img]
    ^^LEGIT ACCOUNTS ^^
    [IMG]https://************.com/sig/020/banned2m0rr0.jpg[/IMG]
    ^^HACKER ACCOUNT^^

Similar Threads

  1. Were do i put the source codes, What file do i use?
    By Masonozone in forum Combat Arms Coding Help & Discussion
    Replies: 10
    Last Post: 06-07-2011, 01:12 PM
  2. How to edit a dll files or reflect to get the source code from it
    By testingid123456 in forum Sudden Attack General
    Replies: 1
    Last Post: 10-13-2010, 11:45 AM
  3. [Vb.net] Write folder with files from resource to..
    By ppl2pass in forum Visual Basic Programming
    Replies: 23
    Last Post: 05-29-2010, 03:08 AM
  4. [Request] How to make chams from source code [Spoonfed]
    By mutemulti in forum Combat Arms Hacks & Cheats
    Replies: 2
    Last Post: 05-26-2010, 05:10 PM
  5. How to Edit a files source Code to change so that it is less detectable
    By zakodia in forum Call of Duty Modern Warfare 2 Help
    Replies: 5
    Last Post: 02-19-2010, 07:24 PM