Changing node of webkit application icon on windows from cli

I'm currently trying to create a .bat script to automatically create my node -webkit application, and only the missing thing changes the generated .exe icon.

I searched for time intervals until I found some working solution.

So far I have tried:

  • Resource Hacker : I managed to change the icon using the application, but could not get it to work with the script. Here is a screenshot of a resource hacker with my exe Resource Hacker with my exe opened I tried the following commands:
    • ResHacker -modify App.exe, AppTest.exe, MyIcon.ico, Icon, 1
    • ResHacker -modify App.exe, AppTest.exe, MyIcon.ico, Icon, 1, 1033
    • ResHacker -addoverwrite App.exe, AppTest.exe, MyIcon.ico, "Icon Group", IDR_MAINFRAME, 1033
    • ResHacker -addoverwrite App.exe, AppTest.exe, MyIcon.ico, "Icon Group", IDR_MAINFRAME

Unfortunately, none of them created the AppTest.exe file, and they did not print or report an error.

  • RCEDIT.exe , which is part of the WinRun4JS application, on their home page shows an example of using RCEDIT to change the icon: RCEDIT.exe /I [YourApp].exe [YourApp].icoit really works, but it breaks the node -webkit executable file and leaves me with the application that runs the nodejs page by default. (Recall that node -webkit exe are constructed this way

  • Various other applications worked fine, but none of them offered a command line interface.

I feel like I'm very close to a solution with Resource Hacker, and maybe I missed something suspicious when I was messing with it, but right now I can’t try anything.

Thank you for reading and have a nice day!

+4
2

, , ResHacker:

ResHacker -addoverwrite "App.exe", "AppTest.exe", "MyIcon.ico", ICONGROUP, IDR_MAINFRAME, 1033

, - mvanderw, Resourcer, :

Resourcer -op:upd -src:App.exe -type:14 -name:IDR_MAINFRAME -file:MyIncon.ico

+4

nw.exe, NodeWebKit. . , NW, .

: , , "Inno Setup", .

UPDATE: , , WinIco nw-builder.

options.winIco

gulp

var nw = new NwBuilder({
    version: '0.12.0',
    files: [ bases.dist + '**'],
    platforms: ['win'],
    buildDir: bases.webkit,
    winIco: 'YourApp.ico',
    macIcns: 'YourApp.icns'
});
0

Source: https://habr.com/ru/post/1523302/


All Articles