Results 1 to 9 of 9

Thread: VB6 package file not working

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2006
    Posts
    30

    VB6 package file not working

    Hello,

    I am trying to make an exe file that when rau, deploys the files joined to it to specific directories list in the code of the package exe.

    It deploys all the files, but the problem is that one of the exe files it deploys does not work after (works fine on its own).

    Could this be because it was compressed or maybe I have to adjust my code so that exe's work when deployed.

    Please have a look:
    VB Code:
    1. Sub Main()
    2.     Dim FileNum     As Integer
    3.     Dim DataArray() As Byte
    4.    
    5.     DataArray = LoadResData(101, "CUSTOM")
    6.     FileNum = FreeFile
    7.     Open "C:\MyProgram.exe" For Binary As #FileNum
    8.     Put #FileNum, 101, DataArray()
    9.     Close #FileNum
    10.    
    11.     Erase DataArray
    12. End Sub

    Thanks anyone

  2. #2

  3. #3
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: VB6 package file not working

    I think "rau" is run or ran.

    Looks like your trying to extract a resource file from the exe and do nothing with it?
    Also, its hard to determine what the issue is as you have no error trapping either.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  4. #4
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: VB6 package file not working

    He's not using an installer. He is attempting to shortcut the installation process with a resource file. I am not sure he fully understand what needs to be done on an installation.

    I know I would not want to run a very large exe that had to deploy many files before it would run. Hopefully they get deployed properly each time.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Jul 2006
    Posts
    30

    Re: VB6 package file not working

    What does P&D stand for in this Wizard you mention.

    Could you give me some error trapping code so that we can see what the problem is please.

    Just trying to deploy the file, not trying to run it with the package although I do want it to be able to run after the package has been executed.

    Cheers
    John

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Jul 2006
    Posts
    30

    Re: VB6 package file not working

    Got the P&D part - packaging and deployment.

    Found the P&D wizard source also although very complex to understand.

    I guess I just need error trapping to see the problem and then extra code to resolve the problem.

    Cheers

  7. #7
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: VB6 package file not working

    If you package it properly you won't need to go through what you are doing. Look in the Application Deployment section in the FAQ for more options.

  8. #8

    Thread Starter
    Junior Member
    Join Date
    Jul 2006
    Posts
    30

    Re: VB6 package file not working

    Ive looked at what you said and Inno seems to be quite complex, I think ill use the P&D wizard of VB6.
    Do I just compile this and make the exe then run it - if so i have tried this and i get various errors when running?
    Cheers

  9. #9
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: VB6 package file not working

    Run what? I have no clue of what you are doing. You have to explain better. Inno Setup has great support and other tools which can help you get your script done.

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