Results 1 to 6 of 6

Thread: [2005] Self opening file inside ZIP

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2006
    Posts
    98

    [2005] Self opening file inside ZIP

    Hi,

    Im looking for the best method of automatically extracting a webpage file from a zip and opening it up on the users pc.

    I have 5 files in a zip file and when the user clicks on xxxxxx.zip i need only the .htm page to open up locally.

    Is this possible or is there any kind of workaround if not?

    thanks!

  2. #2
    Fanatic Member Dnereb's Avatar
    Join Date
    Aug 2005
    Location
    Netherlands
    Posts
    863

    Re: [2005] Self opening file inside ZIP

    No, and any workaround would be fixed so it doesn't work as well

    Suppose you would zip a trojan, virus, backdoor goodies like that in a zip and on opening they would be executed!
    why can't programmers keep and 31 Oct and 25 dec apart. Why Rating is Useful
    for every question you ask provide an answer on another thread.

  3. #3
    PowerPoster Jenner's Avatar
    Join Date
    Jan 2008
    Location
    Mentor, OH
    Posts
    3,712

    Re: [2005] Self opening file inside ZIP

    Yea, it's a huge security risk. ZIP files and other "Archive" class file structures (RAR, ACE, 7Z, etc...) are meant to be just that, archives. Compressed storage containers to make storage and movement of files easy.

    Giving them the ability to execute something when the file is opened is somewhat like giving shotgun shells the ability to explode when the box is opened.
    My CodeBank Submissions: TETRIS using VB.NET2010 and XNA4.0, Strong Encryption Class, Hardware ID Information Class, Generic .NET Data Provider Class, Lambda Function Example, Lat/Long to UTM Conversion Class, Audio Class using BASS.DLL

    Remember to RATE the people who helped you and mark your forum RESOLVED when you're done!

    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. "
    - Albert Einstein

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Oct 2006
    Posts
    98

    Re: [2005] Self opening file inside ZIP

    Thanks for your replies, i see what you mean.

    What about making the other files 'hidden' so that only the .htm file is shown or atleast more prominent?

    This is so they select the htm file and not any other file in the zip.

    thanks

  5. #5
    PowerPoster Jenner's Avatar
    Join Date
    Jan 2008
    Location
    Mentor, OH
    Posts
    3,712

    Re: [2005] Self opening file inside ZIP

    You can add to ZIP archives a tag that will open up a "readme" of text; usually used to provide basic instructions upon opening the ZIP. Not all unzip programs support it though.

    You can set up your file structures so that inside the zip, you have one .HTM file and a directory containing everything else. Label the .HTM file something like README1ST.HTM or something to draw attention to it.
    My CodeBank Submissions: TETRIS using VB.NET2010 and XNA4.0, Strong Encryption Class, Hardware ID Information Class, Generic .NET Data Provider Class, Lambda Function Example, Lat/Long to UTM Conversion Class, Audio Class using BASS.DLL

    Remember to RATE the people who helped you and mark your forum RESOLVED when you're done!

    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. "
    - Albert Einstein

  6. #6
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Re: [2005] Self opening file inside ZIP

    You could change the extension of the file and associate that extension with your own program. Your program would then unzip the archive and then show the HTML file.

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