Jump to content

How Can You Make A Custom Zipping App?


hsncorrosion

Recommended Posts

Basicly I want an app like 7z, winzip, quickzip, etc

That will assoiate and open .hsn files

(a .hsn file is just a renamed extension for a .zip)

I'm sure you want to know why I would want to do this.

I want to use it as a download format in my forum.

I like to have my site name in everything I use. So .hsn adviously stands for HaroldSearchNetworks

Is this Possible, How can I do it?, and is there a legal way to do so?

Link to comment
Share on other sites

Ok, technically its possible. Quite why you would want to do this, I have no idea. No one will be interested in yet another client for opening strange files. This is what standardized formats like zip, rar, and tar are for. You can share your files and be pretty sure that 90% of people can use them without issue.

Link to comment
Share on other sites

Very true and I understand that.

But I'm the kind of person who want to have his own version of whatever if I can. (I understand that probably nobody would use it, But to show my freinds I have it, or to just use it myself makes me happy)

For example there are tons of games out there, But making a crappy flash game or somthing with fpscreator makes me feel good.

Link to comment
Share on other sites

You don't need a special application to open a zip file with a different extension, if the file is in zip format any application will understand it regardless of the extension. All one has to do is associate the .hsn extension with the zip application, but as VaKo said it's pointless and I wouldn't want to do it.

Link to comment
Share on other sites

You don't need a special application to open a zip file with a different extension, if the file is in zip format any application will understand it regardless of the extension. All one has to do is associate the .hsn extension with the zip application, but as VaKo said it's pointless and I wouldn't want to do it.

how can i automate this durring install

Link to comment
Share on other sites

So what will be the extension for the NEXT file format you want to have downloadable from your forum?

Sorry dude, but this looks like a BAD case of NIH-syndrome.

Link to comment
Share on other sites

I've never done it before, I haven't even downloaded Inno Setup before and I can't really be bothered to, but from that FAQ section I'm guessing you need something like this in the setup config file:

[Registry]

Root: HKCR; Subkey: ".hsn"; ValueType: string; ValueName: ""; ValueData: "HSNArchive"; Flags: uninsdeletevalue

Root: HKCR; Subkey: "HSNArchive"; ValueType: string; ValueName: ""; ValueData: "HSN Archive File"; Flags: uninsdeletekey

Root: HKCR; Subkey: "HSNArchiveDefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}7zFM.exe,0"

Root: HKCR; Subkey: "HSNArchiveshellopencommand"; ValueType: string; ValueName: ""; ValueData: """{app}7zFM.exe"" ""%1"""

If you want the change the icon you'll need to change the icon (or one of the icons) of 7zFM.exe. Don't forget to set the [setup] section directive "ChangesAssociations" to "yes" as the FAQ says.

Link to comment
Share on other sites

I've never done it before, I haven't even downloaded Inno Setup before and I can't really be bothered to, but from that FAQ section I'm guessing you need something like this in the setup config file:

[Registry]

Root: HKCR; Subkey: ".hsn"; ValueType: string; ValueName: ""; ValueData: "HSNArchive"; Flags: uninsdeletevalue

Root: HKCR; Subkey: "HSNArchive"; ValueType: string; ValueName: ""; ValueData: "HSN Archive File"; Flags: uninsdeletekey

Root: HKCR; Subkey: "HSNArchiveDefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}7zFM.exe,0"

Root: HKCR; Subkey: "HSNArchiveshellopencommand"; ValueType: string; ValueName: ""; ValueData: """{app}7zFM.exe"" ""%1"""

If you want the change the icon you'll need to change the icon (or one of the icons) of 7zFM.exe. Don't forget to set the [setup] section directive "ChangesAssociations" to "yes" as the FAQ says.

Thanx this worked very well!

Only one problem, I used Resource Hacker to change the icons, Now the .hsn archives have no icon! But aside from that it works like a charm.

Link to comment
Share on other sites

Thanx this worked very well!

Only one problem, I used Resource Hacker to change the icons, Now the .hsn archives have no icon! But aside from that it works like a charm.

This calles for an LOL! :lol:

You could have just pointed the registry entry for the icon to a .ico file or something.

Link to comment
Share on other sites

Sorry my mistake. The icons do work!

I just had .hsn assosiated with winzip so it never changed icons when I swiched.

I installed it on another pc and it works 100%

Now is there a way to add .hsn to the list of files the app can save? So that the hsnarchives can be made without typing .hsn at the end.

Link to comment
Share on other sites

Now is there a way to add .hsn to the list of files the app can save? So that the hsnarchives can be made without typing .hsn at the end.

It's easier to change an extension than add one if you want to modify the existing compiled application because if you add one it increases the file and section sizes and you end up having to change various things in the PE header and section table which I can't be bothered explaining how to do. Alternatively since it's open source you can modify the source and compile it yourself if you know how to do that.

If you are satisfied with replacing the .zip extension with .hsn you can open zip.dll from the Formats directory in a hex editor and edit the name of the archive and the extension it uses. The name starts at 0xE638 and is 6 bytes (it's Unicode so for normal letters every other byte should be 0x00) and the extension starts at 0xE640 and is also 6 bytes.

Edit: Oh, if you edit the name in zip.dll, you need to edit it in 7zG.exe as well, at 0x25858.

Link to comment
Share on other sites

Now is there a way to add .hsn to the list of files the app can save? So that the hsnarchives can be made without typing .hsn at the end.

It's easier to change an extension than add one if you want to modify the existing compiled application because if you add one it increases the file and section sizes and you end up having to change various things in the PE header and section table which I can't be bothered explaining how to do. Alternatively since it's open source you can modify the source and compile it yourself if you know how to do that.

If you are satisfied with replacing the .zip extension with .hsn you can open zip.dll from the Formats directory in a hex editor and edit the name of the archive and the extension it uses. The name starts at 0xE638 and is 6 bytes (it's Unicode so for normal letters every other byte should be 0x00) and the extension starts at 0xE640 and is also 6 bytes.

Edit: Oh, if you edit the name in zip.dll, you need to edit it in 7zG.exe as well, at 0x25858.

What do you use to edit .exe? I'm using Resource Hacker and because 7zG.exe has been compressed I cannot edit it.

Link to comment
Share on other sites

This may be a dumb question, have you tried decompressing the exe first. The most common exe compression is UPX . But a quick google search for "executable compressor" will give you decent list of others.

ok I downloaded upx and decompressed it.

Still a little unsure exactly what to do from there.

Link to comment
Share on other sites

The EXE doesn't need decompressing. I use Hex Workshop, but it doesn't make any difference what you use. I like Hackman as well. I also just tested Hexplorer which is free and that works.

Edit: By the way, you didn't decompress it with UPX, if you try you get "upx: 7zG.exe: NotPackedException: not packed by UPX". In fact I just opened 7zG.exe with Resource Hacker with no errors about being compressed, so I've no idea how you managed to get that.

Link to comment
Share on other sites

Edit -> Goto...

Hex offset 00025858 from beginning of file.

Make sure overwrite is on before you type (OVR in the botttom right corner will be black, if not hit the Insert key), do not overwrite what look like dots in the text, overwrite the Z, then move to the i and overwrite that, then the p. If you make a mistake just undo, backup the exe first as well.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...