GithubHelp home page GithubHelp logo

changeexe's Introduction

changeexe

Change the icon and versioninfo of executable files. Fast. Easy.

installation

npm install changeexe

usage

const changeExe = require('changeexe');

change icon

(async () => { 
    await changeExe.icon('program.exe', 'icon.ico');
})();

change versioninfo

(async () => {
  await changeExe.versionInfo('program.exe', {
    CompanyName: 'Legit Tax Haven, LLC',
    FileDescription: 'An innocent file that will not harm your computer. Double-click to read more.',
    FileVersion: '1.3.3.7',
    LegalCopyright: 'Copyright 2021, all my rights are belong to me.',
    OriginalFilename: 'virus.exe',
    ProductName: 'Not A Virus',
    ProductVersion: '1.2.3.4'
  });
})();

both

(async () => {
  await changeExe.icon('program.exe', 'icon.ico');
  await changeExe.versionInfo('program.exe', {
    CompanyName: 'Legit Tax Haven, LLC',
    FileDescription: 'An innocent file that will not harm your computer. Double-click to read more.',
    FileVersion: '1.3.3.7',
    LegalCopyright: 'Copyright 2021, all my rights are belong to me.',
    OriginalFilename: 'virus.exe',
    ProductName: 'Not A Virus',
    ProductVersion: '1.2.3.4'
  });
})();

changeexe's People

Contributors

si458 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

edenwareapps

changeexe's Issues

adm-zip errors when trying to unzip resource_hacker.zip

I have used changexe for a while (thanks for making it) and it has always downloaded and unzipped Resource Hacker fine, both for development and as part of CI pipelines and such.

However, earlier this week, it started giving errors. For example, on Windows:

npm ERR! code 1
npm ERR! path C:\Users\foo\Appdata\Roaming\nvm\v18.15.0\node_modules\changeexe
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node dlResHack
npm ERR! The license of ResourceHacker.exe forbids distribution with this NPM package, so it will be downloaded at this time.
npm ERR! Downloading resource_hacker.zip ...
npm ERR! Download Completed
npm ERR! Extracting resource_hacker.zip ...
npm ERR! C:\Users\foo\Appdata\Roaming\nvm\v18.15.0\node_modules\changeexe\node_modules\adm-zip\zipFile.js:101
npm ERR!         if (!~endOffset) throw new Error(Utils.Errors.INVALID_FORMAT);
npm ERR!                          ^
npm ERR!
npm ERR! Error: Invalid or unsupported zip format. No END header found
npm ERR!     at readMainHeader (C:\Users\foo\Appdata\Roaming\nvm\v18.15.0\node_modules\changeexe\node_modules\adm-zip\zipFile.js:101:32)
npm ERR!     at new module.exports (C:\Users\foo\Appdata\Roaming\nvm\v18.15.0\node_modules\changeexe\node_modules\adm-zip\zipFile.js:19:9)
npm ERR!     at new module.exports (C:\Users\foo\Appdata\Roaming\nvm\v18.15.0\node_modules\changeexe\node_modules\adm-zip\adm-zip.js:62:18)
npm ERR!     at WriteStream.<anonymous> (C:\Users\foo\Appdata\Roaming\nvm\v18.15.0\node_modules\changeexe\dlResHack.js:19:21)
npm ERR!     at WriteStream.emit (node:events:525:35)
npm ERR!     at finish (node:internal/streams/writable:748:10)
npm ERR!     at finishMaybe (node:internal/streams/writable:733:9)
npm ERR!     at afterWrite (node:internal/streams/writable:507:3)
npm ERR!     at onwrite (node:internal/streams/writable:480:7)
npm ERR!     at node:internal/fs/streams:410:5
npm ERR!
npm ERR! Node.js v18.15.0

I get similar errors in my Linux-based CI pipelines. I noticed that Resource Hacker recently released a new version (5.2.3) and the date roughly corresponds to when things started breaking. Strangely I can still download the resource_hacker.zip manually and unzip it using OS unzip tools/commands fine.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.