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!

BenKell
Posts: 11
Joined: Tue Aug 07, 2012 11:07 pm

Need to Copy File in System32 Folder During x64 Install

Good Afternoon All -

I've spent the past 2 hours trying to get a tiny 1kb file to work in my MSI installer using Advanced Installer 9.6.1. The package I'm creating is very simple and will be used to make sure No Adobe products auto-update on our workstations via files on workstations and registry keys. Here's what the packages does:

- Adds a few registry keys to Windows on target workstation
- Adds a file to %APPDATA%\Adobe\AIR on target workstation
- Adds a file to the following 2 paths:
- C:\Windows\System32\Macromed\Flash
- C:\Windows\SysWow64\Macromed\Flash

After creating it, it all works great - except - that it doesn't put the file in System32\Macromed\Flash. I read that it was because it was a 64 bit installer. I saw that I could create a mixed installer, but need it to be an MSI if at all possible. I then tried the following as workarounds:

- Made a Custom Action with attached batch file to copy file from application folder to System32\Macromed\Flash at the commit state - didn't work
- Made a Custom Action with attached batch file to copy file from public UNC share to System32\Macromed\Flash at the commit state - didn't work
- Made a Custom Action with attached VBS file (uses xcopy) to copy file from application folder to System32\Macromed\Flash at the commit state - didn't work

All of the above worked when run manually on my workstation, but not in install. This is when I realized that the application, itself must not have any access to System32 during installation.

So... besides a custom action putting a file in the startup folder to add file at next reboot :D , what can I do?

Thanks!

One more thing...

I was going to leave this out of app, but since I'm posting might as well ask... It's easy to add registry keys via an installer - but - how can existing ones be removed with installer? Would it have to be done by running custom script and not though Registry GUI section of Advanced Installer? Thanks
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Need to Copy File in System32 Folder During x64 Install

Hello,
So... besides a custom action putting a file in the startup folder to add file at next reboot :D , what can I do?
In order to achieve this you can proceed like this:
- Go to "Install Parameters" page and set the "Package Type" field to 64-bit package.
- Go to "Files and Folders" page and add the file in the "System\Macromed\Flash" and "System 64\Macromed\Flash" folders.
- Build and run your package.

Also, you can take a look on our "Folder Paths" article.
I was going to leave this out of app, but since I'm posting might as well ask... It's easy to add registry keys via an installer - but - how can existing ones be removed with installer? Would it have to be done by running custom script and not though Registry GUI section of Advanced Installer?
If you want to remove a registry value, then you can add a registry value removal, on "Registry" page, using the "New Value Removal" context menu option. Also, if you want to remove a registry key, then you can add a registry key removal operation in the "Edit Registry Key" dialog.

Let us know if this helped.

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

Return to “Building Installers”