Destination Dialog

Got a problem you cannot solve? Try here.
Lin
Posts: 29
Joined: Mon Apr 16, 2007 12:53 pm

Destination Dialog

Postby Lin » Wed Jul 11, 2007 1:00 pm

I have a destination dialog for the path to install Microsoft SQL Server. In this case the folder doesn't exist on the machine yet. I set a variable (SQLPath) to where the default is ($PROGRAMFILES$Microsoft SQL Server), display the dialog where I have both the PTShellTree and the edit box set to receive the written variable value and the write value to variable SQLPath. Right before it shows the dialog my variable is right but for some reason when it displays the dialog it is setting my SQLPath varible to C:\\Documents and Settings\\User\\Desktop. I just upgraded to Install Aware 7 and I am certain this was working with my previous version. Any ideas?

Thanks
Lin

MathewV
Posts: 3
Joined: Tue Oct 09, 2007 2:54 am

Postby MathewV » Tue Oct 09, 2007 3:03 am

Hi All,

Has anyone found a fix for this? I am trialing this to see if I want to change to it and I have had a very frustrating day trying to get past this exact issue.

I've taken a copy of the Vista Black destination dialog and set it to "[Written Variable Value]" and my variable as the "Writes Value...".

Before the call to the dialog the variable is correct, but in the dialog it just defaults to Desktop.

Request to InstallAware : I have been down a couple of wrong paths because I did not look at the date of the posts on this forum. Can you please clean up posts that are no longer relevant.

Alex_Ronquillo
Site Admin
Posts: 364
Joined: Mon Jul 30, 2007 11:51 am
Location: USA
Contact:

Postby Alex_Ronquillo » Tue Oct 09, 2007 10:37 am

MathewV,

Please send a simple project recreating this problem. We'll take a look to it.
Alejandro Ronquillo
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

MathewV
Posts: 3
Joined: Tue Oct 09, 2007 2:54 am

Postby MathewV » Tue Oct 09, 2007 5:44 pm

Thanks Alex,

I appreciate any help as this is a real road-block for me.

Attached is a sample -I've commented out all the files, so there should be no missing dependancies. The first Folder destination works fine, but the second (DataDestination) is not working - it defaults to my desktop instead of C:\\Program Data ($ALLAPPDATA$) as the variable states before the dialog is called.

P.S. I saved this project to a new location and the mia file did not get saved with it. I had to move it manually and then modify the mpr file.

Mathew.
Last edited by MathewV on Thu Oct 11, 2007 7:28 pm, edited 1 time in total.

Alex_Ronquillo
Site Admin
Posts: 364
Joined: Mon Jul 30, 2007 11:51 am
Location: USA
Contact:

Postby Alex_Ronquillo » Wed Oct 10, 2007 11:50 am

Apparently there was two problems with your project:

1st:

Code: Select all

Set Variable TARGETDATADIR to $ALLAPPDATA$\\Market Analyst\\Data


This resulted in variable TARGETDATADIR being "C:\\Document and Settings\\All Users\\Application Data\\\\MArket Analyst\\Data"

Solution: Remove the backslash after $ALLAPPDATA$

Code: Select all

Set Variable TARGETDATADIR to $ALLAPPDATA$Market Analyst\\Data
Alejandro Ronquillo

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

Alex_Ronquillo
Site Admin
Posts: 364
Joined: Mon Jul 30, 2007 11:51 am
Location: USA
Contact:

Postby Alex_Ronquillo » Wed Oct 10, 2007 11:59 am

Apparently there was two problems with your project:

1st:

Code: Select all

Set Variable TARGETDATADIR to $ALLAPPDATA$\\Market Analyst\\Data


This resulted in variable TARGETDATADIR being "C:\\Document and Settings\\All Users\\Application Data\\\\MArket Analyst\\Data"

Solution: Remove the backslash after $ALLAPPDATA$

Code: Select all

Set Variable TARGETDATADIR to $ALLAPPDATA$Market Analyst\\Data


2nd: Folder C:\\Document and Settings\\All Users\\Application Data\\MArket Analyst\\Data" usually does not exist in the target computer, so you need to create the folders before referencing them from a PTShellTree. Here is what I did, starting at line 115 of your code:

Code: Select all

  Set Variable TARGETDIR to $PROGRAMFILES$\\$TITLE$
  Set Variable STARTMENU to $TITLE$
  Set Variable TARGETDATADIR to $ALLAPPDATA$Market Analyst\\Data
  Set Variable exists to
  Set Variable result to
  Does Folder Exist $ALLAPPDATA$Market Analyst (get result into variable exists)
  if Variable exists Equals (Ignore Case) FALSE
    Call DLL Function $WINSYSDIR$kernel32.dll->CreateDirectoryA (get result into variable result)
  end
  Does Folder Exist $TARGETDATADIR$ (get result into variable exists)
  if Variable exists Equals (Ignore Case) FALSE
    Call DLL Function $WINSYSDIR$kernel32.dll->CreateDirectoryA (get result into variable result)
  end


I attached a zip file that contains the two screenshots of the "Call DLL Function" commands.

I hope this was helpful.
Alejandro Ronquillo

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

MathewV
Posts: 3
Joined: Tue Oct 09, 2007 2:54 am

Postby MathewV » Wed Oct 10, 2007 5:13 pm

Hi Alex,

Thanks for that I really appreciate your replay...but.... it seem unusual to me that I would go and create directories on a clients PC just so I can ask them where they want to install their data to.

I understand then that this may be a limitation of the Tree view and I'll see what else I can do to allow my users to select a new location which would be made up of previously uncreated folders.

Thanks again I do appreciate your input.

Mathew


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 124 guests