Results 1 to 4 of 4

Thread: Compile another file in with my vbprogram.exe

  1. #1

    Thread Starter
    Addicted Member theonetrueace's Avatar
    Join Date
    Jan 2002
    Location
    South Alabama
    Posts
    196

    Compile another file in with my vbprogram.exe

    how would i conseal another file, say another program.exe ...that i would want to extract from my program at one time or another... no im not trying to make a trojan or virus ... LoL ... anyway... any1 no?

  2. #2
    Frenzied Member mxnmx's Avatar
    Join Date
    Dec 2001
    Location
    I'm back...now!!!
    Posts
    1,396
    This might be helpful...

    Shell Function


    Runs an executable program and returns a Variant (Double) representing the program's task ID if successful, otherwise it returns zero.

    Syntax

    Shell(pathname[,windowstyle])

    The Shell function syntax has thesenamed arguments:

    Part Description
    pathname Required; Variant (String). Name of the program to execute and any requiredarguments orcommand-line switches; may include directory or folder and drive.

    windowstyle Optional. Variant (Integer) corresponding to the style of the window in which the program is to be run. If windowstyle is omitted, the program is started minimized with focus.


    The windowstyle named argument has these values:

    Constant Value Description
    vbHide 0 Window is hidden and focus is passed to the hidden window.
    vbNormalFocus 1 Window has focus and is restored to its original size and position.
    vbMinimizedFocus 2 Window is displayed as an icon with focus.
    vbMaximizedFocus 3 Window is maximized with focus.
    vbNormalNoFocus 4 Window is restored to its most recent size and position. The currently active window remains active.
    vbMinimizedNoFocus 6 Window is displayed as an icon. The currently active window remains active.


    Remarks

    If the Shell function successfully executes the named file, it returns the task ID of the started program. The task ID is a unique number that identifies the running program. If the Shell function can't start the named program, an error occurs.

    Note By default, the Shell function runs other programs asynchronously. This means that a program started with Shell might not finish executing before the statements following the Shell function are executed.

  3. #3

    Thread Starter
    Addicted Member theonetrueace's Avatar
    Join Date
    Jan 2002
    Location
    South Alabama
    Posts
    196
    hmmmmmmmm...interesting...any1 else got info on this topic?

  4. #4
    Fanatic Member SeaHag's Avatar
    Join Date
    Jul 2001
    Location
    Lake Huron
    Posts
    901
    res files...
    heres some code to extrsact them...

    VB Code:
    1. Sub ExtractFiles(Directory As String, fileType As String, fileName As String)
    2.     Dim I As Integer, btBuffer() As Byte, btFileNum As Byte
    3.    
    4.     On Error Resume Next ' We don't want to handle the Path Already Exists error which might occur...
    5.     Call MkDir(Directory) ' Create the directory.
    6.     On Error GoTo 0 ' Cancel error handling. We want to know about further errors, it will help us fix them.
    7.    
    8.         btBuffer = LoadResData(101, fileType) ' 101, 102, 103 and 104! (index,format)
    9.         btFileNum = FreeFile ' Get the free file number!
    10.         Open Directory & "\" & fileName & "." & fileType For Binary As #btFileNum ' Open the file!
    11.             Put #btFileNum, , btBuffer ' Write to the file!
    12.         Close #btFileNum ' Close the file!
    13.    
    14. End Sub


    What you have to do is....

    1. through the "addins" menu. you will have to check the
    vb 6 Resource editor
    2. refere to the project tree view.. Right click, choose ADD..
    Add a resource file
    3. choose Add Custom Resource...... Find the file.. etc.
    4. Right click on the file you just added. and choose properties...
    then change the extension of the filee...

    5, Use the code I got from the board here.. ..


    I think thats got it..

    Seahag

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width