PDA

View Full Version : 64 Bit ProgramFilesFolder Problem



majorburner
07-18-2006, 06:07 AM
Ok, here is my problem.

I have an installer that connects to a SQL Server 2005 and creates a Database with an SQL Script.

In the sql script i set the Path to the File with "Text Replacement".

Therefor i use a Property which i set to the path.

The standard Path for this would be: "E:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data"

When "E:\Program files" is Program filesDir for 32 Bit applications.

Now comes the problem:

Every time i specify a path below "E:\Program files" Installshield replaces this with "E:\Program files (x86)".

Why is this happening? I am debugging this now since a long time ... I am totally lost :(

michael.s.white
07-19-2006, 01:13 PM
Ok, here is my problem.

I have an installer that connects to a SQL Server 2005 and creates a Database with an SQL Script.

In the sql script i set the Path to the File with "Text Replacement".

Therefor i use a Property which i set to the path.

The standard Path for this would be: "E:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data"

When "E:\Program files" is Program filesDir for 32 Bit applications.

Now comes the problem:

Every time i specify a path below "E:\Program files" Installshield replaces this with "E:\Program files (x86)".

Why is this happening? I am debugging this now since a long time ... I am totally lost :(


It is not IS replacing the folder name it is the OS chanign the folder. the x86 folder is what the 64 bit OS uses for 32 bit compatability mode applications. There is a different property for the 64 bit program files folder. It is [ProgramFiles64Folder].

To make your life more interesting. SQL server 2005 can be installed as 64 bit or as 32 bit so could be in either folder.

I would recomend reading the SQL path out fo the registry so that the install will adapt to the possible changes.

majorburner
07-20-2006, 02:25 AM
This is the funny thing about it.

I read the SQL path out of the registry, maybe modify it with a Folder Dialog,

and in the end (right before SQL Script execution) the path gets changed ...

vchappav
02-12-2007, 02:34 AM
See the link below ... it may help!

http://msdn2.microsoft.com/en-us/library/aa372396.aspx

Thanks,
venkat