Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Making exe corrupt #4

Open
Krunal-Gosalia opened this issue Mar 9, 2018 · 1 comment
Open

Making exe corrupt #4

Krunal-Gosalia opened this issue Mar 9, 2018 · 1 comment

Comments

@Krunal-Gosalia
Copy link

Krunal-Gosalia commented Mar 9, 2018

require("openurl").open("http://www.google.com");

This is code in app.js - used pkg for creating app.exe and running below code for changing icon
Output - creates new app.exe with icon but make it invalid

const resourceHacker = require('node-resourcehacker');

// Use the beta release of Resource Hacker.
process.env['SOURCE_RESOURCE_HACKER'] = 'http://www.angusj.com/resourcehacker/resource_hacker.zip';

// Use a local Resource Hacker archive.
//process.env['SOURCE_RESOURCE_HACKER'] = '~/Downloads/resource_hacker.zip';

resourceHacker({
operation: 'addoverwrite',
input: 'app.exe',
output: 'app_blue.exe',
resource: 'blue.ico',
resourceType: 'ICONGROUP',
resourceName: 'IDR_MAINFRAME',
}, (err) => {

if (err) {
    return console.error(err);
}

console.log('Done.');

});

Please let me know if I am doing any step wrong.

It is opening and closing the window in millisec so cannot see error. it is related to identifier i guess so

@ramtinsoltani
Copy link

You're probably using an iconset with different dimensions than the original on the executable (thus corrupting the binary). Take a look at this issue (read the last comment by "KingRial") for more details and the exact dimensions to use.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants