Page 1 of 1

Destination Dialog

Posted: Wed Jul 11, 2007 1:00 pm
by Lin
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

Posted: Tue Oct 09, 2007 3:03 am
by MathewV
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.

Posted: Tue Oct 09, 2007 10:37 am
by Alex_Ronquillo
MathewV,

Please send a simple project recreating this problem. We'll take a look to it.

Posted: Tue Oct 09, 2007 5:44 pm
by MathewV
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.

Posted: Wed Oct 10, 2007 11:50 am
by Alex_Ronquillo
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

Posted: Wed Oct 10, 2007 11:59 am
by Alex_Ronquillo
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.

Posted: Wed Oct 10, 2007 5:13 pm
by MathewV
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