hsncorrosion Posted March 22, 2007 Share Posted March 22, 2007 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? Quote Link to comment Share on other sites More sharing options...
VaKo Posted March 22, 2007 Share Posted March 22, 2007 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. Quote Link to comment Share on other sites More sharing options...
hsncorrosion Posted March 22, 2007 Author Share Posted March 22, 2007 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. Quote Link to comment Share on other sites More sharing options...
Shaun Posted March 22, 2007 Share Posted March 22, 2007 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. Quote Link to comment Share on other sites More sharing options...
hsncorrosion Posted March 22, 2007 Author Share Posted March 22, 2007 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 Quote Link to comment Share on other sites More sharing options...
Shaun Posted March 22, 2007 Share Posted March 22, 2007 What installer are you using? Quote Link to comment Share on other sites More sharing options...
hsncorrosion Posted March 22, 2007 Author Share Posted March 22, 2007 What installer are you using? I have install creator pro and inno setup compiler Quote Link to comment Share on other sites More sharing options...
Shaun Posted March 22, 2007 Share Posted March 22, 2007 Inno: http://www.jrsoftware.org/isfaq.php#assoc Quote Link to comment Share on other sites More sharing options...
hsncorrosion Posted March 22, 2007 Author Share Posted March 22, 2007 Inno:http://www.jrsoftware.org/isfaq.php#assoc Hmm... Have not done this before. Can you give me a tutorial for how to do this in inno using 7z with the .hsn extension? Quote Link to comment Share on other sites More sharing options...
cooper Posted March 22, 2007 Share Posted March 22, 2007 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. Quote Link to comment Share on other sites More sharing options...
Shaun Posted March 22, 2007 Share Posted March 22, 2007 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. Quote Link to comment Share on other sites More sharing options...
hsncorrosion Posted March 23, 2007 Author Share Posted March 23, 2007 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. Quote Link to comment Share on other sites More sharing options...
moonlit Posted March 23, 2007 Share Posted March 23, 2007 Waste of time, use .zip, .rar, ,7z or whatever, but don't try to invent your own extention. Quote Link to comment Share on other sites More sharing options...
lunex Posted March 23, 2007 Share Posted March 23, 2007 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! You could have just pointed the registry entry for the icon to a .ico file or something. Quote Link to comment Share on other sites More sharing options...
hsncorrosion Posted March 23, 2007 Author Share Posted March 23, 2007 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. Quote Link to comment Share on other sites More sharing options...
Shaun Posted March 23, 2007 Share Posted March 23, 2007 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. Quote Link to comment Share on other sites More sharing options...
hsncorrosion Posted March 23, 2007 Author Share Posted March 23, 2007 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. Quote Link to comment Share on other sites More sharing options...
hsncorrosion Posted March 23, 2007 Author Share Posted March 23, 2007 I need to know what hex editor your using. or possibly could u or someone else make the hsn.dll and 7zG.exe for me? I have tried some freeware hex editors with no sucess. Quote Link to comment Share on other sites More sharing options...
psychoaliendog Posted March 23, 2007 Share Posted March 23, 2007 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. Quote Link to comment Share on other sites More sharing options...
hsncorrosion Posted March 23, 2007 Author Share Posted March 23, 2007 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. Quote Link to comment Share on other sites More sharing options...
Shaun Posted March 23, 2007 Share Posted March 23, 2007 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. Quote Link to comment Share on other sites More sharing options...
SenorDestruction Posted March 23, 2007 Share Posted March 23, 2007 if you're using unix/linux you could always do something like a shar file system... google shar files if you dont know what i mean, not sure how you'd go about compression, but you could have the extension as whatever you wanted, or nothing at all... Quote Link to comment Share on other sites More sharing options...
Shaun Posted March 23, 2007 Share Posted March 23, 2007 I think it's pretty obvious he's using Windows. Quote Link to comment Share on other sites More sharing options...
hsncorrosion Posted March 23, 2007 Author Share Posted March 23, 2007 I got Hex Workshop I cant find anything that looks like this 0x25858 Quote Link to comment Share on other sites More sharing options...
Shaun Posted March 23, 2007 Share Posted March 23, 2007 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.