0
votes

I have a batch file which modifies some files within program files upon installation of an application using NSIS.

The issue I currently have is that NSIS is not running the batch file with administrator permissions so the script fails.

Is it possible to run the script with the required admin permission set?

It must support the OS XP+, and the batch script is run from an NSIS installer.

2
What OS and how do you start the batch (manually, scheduled task, etc)? Which lines of command(s) fail and what the error is? - user2299169
@Mark please see revised question - Matt Seymour
Oh I see! With any rights an app runs, all apps it starts up will inherit the same so you'll have to start nsis app with admin rights. For that, here's the solution: stackoverflow.com/questions/8732019/… - user2299169

2 Answers

3
votes

Is the NSIS installer being ran with administrator permissions? If so, any process that the installer starts will also have administrator permissions.

Check out Ander's answer on how to request admin rights for your installer:

https://stackoverflow.com/a/8735349/1030416

0
votes

How do you execute your batch? Exec, ExecShell or nsExec?

Try changing it or paste snippet of your code here.