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!

jstuardo
Posts: 88
Joined: Mon Nov 09, 2015 10:44 pm

Problem saving files to system32 and SysWow64 folders

Hello,

I need a lot of DLL's to be saved in both system32 and SysWow64 folders in x64 machine. So in Files, Folders and Shortcuts page I have added the DLL's in both System and Sytem 64 folders. After installation, I saw that the DLL's were copied only in SysWow64 folder.

What is wrong here?

Thanks
Jaime
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Problem saving files to system32 and SysWow64 folders

Hi Jaime,

When a 32-bit application writes or reads a value under the C:\Windows\System32 directory , the application reads from the C:\Windows\SysWOW64 directory on a 64-bit operating systems. This is the default behaviour of the 32-bit installation packages on 64-bit machines.

To overcome this issue, please take a look on the How do I always install some resources in the "C:\Windows\System32" path, regardless the plaform? article.

Should there be any difficulty you encounter implementing something, please do not hesitate to contact me and I will gladly assist.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jstuardo
Posts: 88
Joined: Mon Nov 09, 2015 10:44 pm

Re: Problem saving files to system32 and SysWow64 folders

Hello and thanks for your reply.

So, even when this is a 32 bits application should I create a mixed 32/64 bits package? Can I modify it when then project is already created without the need to add again all the files and themes and whatever I have already added?

I only need DLL's to be copied into System32 folder besides SysWow64 folder and according documentation, "System 64" will resolve to System32 on 64 bits machines. Since it did not work, I am not really sure that by changing project type will resolve the issue.

Or maybe, a descent approach could be to create a VBS script that copies the DLL files from SysWow64 to System32.

Best regards
Jaime
jstuardo
Posts: 88
Joined: Mon Nov 09, 2015 10:44 pm

Re: Problem saving files to system32 and SysWow64 folders

Hello? there is no more replies?
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Problem saving files to system32 and SysWow64 folders

Hello Jaime,

We apologize for our delayed reply.

Yes, you can modify the current project settings. Just go to "Install Parameters" page and select the mixed package type.

Also, please take a look over our "Package Types" article to see hot the folder paths are resolved depending on the setup package type.

If you have any questions let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jstuardo
Posts: 88
Joined: Mon Nov 09, 2015 10:44 pm

Re: Problem saving files to system32 and SysWow64 folders

Thanks, sorry for the insistence, but, this is a x86 application. When I changed the project type, a wizzard appeared showing this message at the second dialog: "On 64-bit machines this folder will be used if the above option is selected. On 32-bit machines it will be redirected to Application Folder instead".

That suggested me 2 things: if the application is installed on 64-bits machines, the application will be installed in a folder called 32-bit inside application folder. And if i specified files in the first dioalog box of the wizard, files will be installed in "Program Files".

All above is not right:

If the application is installed in 64 bits machines, files should be installed in C:\Program Files (x86), and if the application is installed in 32 bits machines, files should be installed in C:\Program Files.

Other fact. I have already installed the application in 32 bits machines and all worked perfect, however, a directory called System64Folder was created in Application Folder. Is there a way to avoid that?

Regards
Jaime
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Problem saving files to system32 and SysWow64 folders

Hello Jaime,

Can you please proceed like this:
1. go to "Install Parameters" page and set the mixed package type; during the mixed package wizard do not add any resource files as 32-bit or 64-bit resources
2. set the "Application Folder" filed like this (this way the installation folder will be resolved to Program Files on 32-bit machines and to Program Files (x86) on 64-bit machines):

Code: Select all

[ProgramFilesFolder][ProductName]
3. go to "Files and Folders" page and add your application files in the desired folders; also the related DLLs must be added under "System", respectively "System 64" folders.

Let us know if this helped, otherwise please give us a complete description of the installation folders where you want to install your application files depending on the operating system architecture.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jstuardo
Posts: 88
Joined: Mon Nov 09, 2015 10:44 pm

Re: Problem saving files to system32 and SysWow64 folders

Thanks, I will do it however, I don't test it yet, because I have encountered another problem regarding the same.

I have 2 features and I need to install some DLL's in system folder depending on selected feature, but that is not allowed because the files have the same name. i will explain this with an example.

Suppose you have 2 features. One called "Updated System" and other called "Legacy System". On the other hand, I have 2 DLL's, both called "Driver.dll" but at different locations because one DLL controls a modern hardware device and the other controls an old device. Of course, both DLL's received the same name by the hardware manufacturer, but the only difference is the type of device they control, modern or legacy.

That is not allowed by Advanced Installer, at first glance. I think it should be possible to do this. Apparently, only the DLL name must be unique, but I think that the correct thing would be the pair "feature and DLL name" must be unique. Is there a way to solve this or do i need to create 2 installers? I hope not.

regards
Jaime
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Problem saving files to system32 and SysWow64 folders

Hello Jaime,

To achieve your last requirement you should just use a similar approach with the one exposed in our "Install files with the same name" article.

Let us know if this helped.

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

Return to “Building Installers”