AngaBlue/exe

Pls add an option for changing the security level

Closed this issue · 11 comments

For example:
asInvoker or requireAdministrator

(changing manifest of the exe)

And how to include node_modules as assets?
Or other pictures and scripts?

For example:
asInvoker or requireAdministrator

(changing manifest of the exe)

Is this functionality supported by ResEdit? If so I can add it, or you can submit a PR.

And how to include node_modules as assets?
Or other pictures and scripts?

Please refer to Vercel's exe package documentation.

Please refer to Vercel's exe package documentation.

Yeah, I mean I can only add arguments in the json file.
Like:
pkg: ['-C', 'GZip']

but when I want to add the array for static files or other scripts how I can put it into this array in your config.
which symboles I need to use?

For example:
(pkg: ['--debug', '--no-bytecode']) is easy but how I type in there the scripts or assets?

Or do i need to add soemthing in the package.json? (I only know this way)

There can be only one entry point for an executable, you can't have multiple scripts.

As for the namesake of this issue, I don't see how this is possible with ResEdit. If you know otherwise, please submit a PR and I will happily review it.

Please refer to Vercel's exe package documentation.

Yeah, I mean I can only add arguments in the json file. Like: pkg: ['-C', 'GZip']

but when I want to add the array for static files or other scripts how I can put it into this array in your config. which symboles I need to use?

For example: (pkg: ['--debug', '--no-bytecode']) is easy but how I type in there the scripts or assets?

if you want to add assets/scripts, add this option:

pkg: ["-c", "./package.json"]

the package.json should contain your assets tree:

"pkg": {
    "assets": [
      "./script1.cjs",
      "./script2.cjs",
      "./script3.cjs"
    ]
  },
RGdevz commented

For example:
asInvoker or requireAdministrator
(changing manifest of the exe)

Is this functionality supported by ResEdit? If so I can add it, or you can submit a PR.

hi, yes you can do it like this:

const exe = PELibrary.NtExecutable.from(fs.readFileSync(path.resolve('app.exe')))
const ntExecutableResource = PELibrary.NtExecutableResource.from(exe)

const manifest = ntExecutableResource.getResourceEntriesAsString(24,1)[0][1]

ntExecutableResource.replaceResourceEntryFromString(24,1,1033,manifest.replace('asInvoker','requireadministrator'))
ntExecutableResource.outputResource(exe)

fs.writeFileSync('MyApp_modified.exe', Buffer.from(exe.generate()));

Hi, @RGdevz thank you for the code snippet. I'm implementing this feature now.

The executionLevel option has be added in the latest version (v2.1.0). Thank you again for your contribution!