We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

rmusick
Posts: 18
Joined: Tue Jun 11, 2013 2:51 pm

Taking Ownership and Overwriting a system file

Hi Could someone tell me how to do this:
I am trying to copy over a System file in C:\Windows\System32 but it keeps failing.
I know in Batch I have to do this:
KIll Explorer.exe
cmd.exe /c takeown /f "%windir%\system32\file.dll" && icacls "%windir%\system32\file.dll" /grant administrators:F
Copy the file
Start explorer.

Any Ideas?
Thanks.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Taking Ownership and Overwriting a system file

Hello,

To achieve what you want you can try to use a "Launch file" custom action which will run the related cmd.exe command.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”