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!

shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Copying 64bit file(into system32 folder) in a 32 bit setup

Hi,

I have a 32 bit setup(per machine), which needs to do the following
On 32 bit machines:
- copy the teles.tsp(32 bit) into c:\windows\system32
On 64 bit machines:
- copy the teles.tsp(64 bit) into c:\windows\system32

In the setup, I have done the following
- teles.tsp(32 bit) is copied to SystemFolder
- teles.tsp(64 bit) is copied to System64Folder
- On orgranization page, I have set "64 bit Component" for the teles.tsp(64 bit)

This works fine on 32 bit machines.

However, on 64 bit machine setup copies the teles.tsp(32 bit) to c:\windows\sysWOW64.

Can you please help me to fix this?

Note: After reading couple of articles I understand that if I change the installer to mixed(32/64) it would work. However, I can not change this to mixed because of some other limitations(http://www.advancedinstaller.com/forums ... =5&t=28255)
Preferably, I would like to go with 32 bit setup. Even a workaround would be fine.

Regards,
Rohan
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Copying 64bit file(into system32 folder) in a 32 bit set

Hi Rohan,
However, on 64 bit machine setup copies the teles.tsp(32 bit) to c:\windows\sysWOW64.
I'm afraid that this is the Windows Installer normal behavior. A 32-bit package cannot write in a 64-bit location (i.e. in the "System32" folder).
Can you please help me to fix this?
In order to fix this you can create a "Mixed 32/64-bit package" or you can try to create a 64-bit custom action that is launched by the 32-bit package and copies those files in the 64-bit location (System32).
Note: After reading couple of articles I understand that if I change the installer to mixed(32/64) it would work. However, I can not change this to mixed because of some other limitations(http://www.advancedinstaller.com/forums ... =5&t=28255)
Preferably, I would like to go with 32 bit setup. Even a workaround would be fine.
It seems that my colleague Dan made a confusion there. As I mentioned above, the only limitation is that a 32-bit package cannot write in a 64-bit location, but a 64-bit package can write in a 64-bit location and a 32-bit location, too. Sorry from the mistake from that post.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Copying 64bit file(into system32 folder) in a 32 bit set

Thanks Eusebiu,

Code: Select all

you can try to create a 64-bit custom action that is launched by the 32-bit package and copies those files in the 64-bit location (System32).
Can you please explain little bit more about this, Are you saying something like the following
- Copy Teles32.tsp into some folder(say temp)
- Copy Teles64.tsp into some folder(say temp)
- Write a custom action(say a c++ executable) which would do the following
------ On 32 bit machine, it would copy %temp%/Teles32.tsp to c:\windows\system32
------ On 64bit machine, it would copy %temp%/Teles64.tsp to c:\windows\system32

I think, there might be a simpler way of doing this, if so, can please help me with the same??
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Copying 64bit file(into system32 folder) in a 32 bit set

Hi Rohan,

Indeed, the way you described is what I meant. You can also set a condition for the temporary files depending on the machine type (i.e VersionNT64, NOT VersionNT64), so only the necessary one will be copied in the temp folder (32-bit or 64-bit).

To add your files as temporary, you can use the [Temporary Files] toolbar button from the Files and Folders page.

Another solution would be to place your files next to the installation package and copy them from there using the [SourceDir] property.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Copying 64bit file(into system32 folder) in a 32 bit set

Thanks. I do appreciate your help.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Copying 64bit file(into system32 folder) in a 32 bit set

You're welcome. Glad to help.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Copying 64bit file(into system32 folder) in a 32 bit set

I found a minor issue, may be you already know this.

I have added custom action
- Launch attached file
- File type : exe
- Command Line: install "[TSP_Dir]"

When AdvancedInstaller invokes the executable, it sends an extra quote(") for the second parameter.

If you need help in reproducing this please do let me know.

Note: [TSP_Dir] has two more folders 32_bit(copy to the parent folder), and 64_bit(copy to the parent folder)
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Copying 64bit file(into system32 folder) in a 32 bit set

Hi Rohan,

I didn't encounter this problem, yet. Can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com, so we can investigate them?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Copying 64bit file(into system32 folder) in a 32 bit set

Its a big project with lot of files, I will strip these and send the sample to you by tomorrow.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Copying 64bit file(into system32 folder) in a 32 bit set

Okay Rohan, no problem.

I tested the scenario, but I couldn't reproduce the problem, so I will wait for your files.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Copying 64bit file(into system32 folder) in a 32 bit set

Please find attached the aip file.

In the C Program, I am just doing the following
int main(int argc, char * argv[])

Code: Select all

{
	if (argc >= 3)
	{
		if (0 == _stricmp(argv[1], "install"))
		{
			printf(argv[1]);
			printf("\r\n");
			printf(argv[2]);
			printf("\r\n");
			Sleep(30000);
		}
		else if (0 == _stricmp(argv[1], "uninstall"))
		{
		}
	}
	return 0;
}
Do Let me know if you need any help in reproducing this problem.
Attachments
AiSample.zip
(155.36 KiB) Downloaded 682 times
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Copying 64bit file(into system32 folder) in a 32 bit set

Hi Rohan,

I tested your the sample that you attached and indeed, I reproduced the behavior. However, it seems to be a problem with the way your custom action parses the string that is sent to it.

The last quote is added only if the "\" character is before it and in that case the "quote" character is escaped. I tested your custom action in the Command Prompt and I got the result below:
  • Command line sent:

    Code: Select all

    install "C:\Program Files\folder\"
    Result

    Code: Select all

    C:\Program Files\folder"
    [/b]
Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Copying 64bit file(into system32 folder) in a 32 bit set

Thanks
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Copying 64bit file(into system32 folder) in a 32 bit set

You're welcome.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”