cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
bobmcm461
Pilgrim

ISPROJECTDIR duplicating directory issue.

I continue to have this problem come up, and looking through the forums, this problem has existed for a long time (almost 10 years).

Every so often when I load the project, ISPROJECTDIR and the ISProjectDataFolder both have an extra directory level in them. For example:

ISProjectFolder = "C:\CurrentDev\ProjectDirectory\"
This is correct

ISPROJECTDIR = "C:\CurrentDev\ProjectDirectory\ProjectDirectory"
ISProjectDataFolder = "C:\CurrentDev\ProjectDirectory\ProjectDirectory"

This is incorrect. There is an extra ProjectDirecory at the end of the variable.

The only solution that I have seen is to go into the direct editor, and change the type from 1 to 2 and then manually edit the paths. This means that I have to fix this problem every time the project gets moved. We have a build machine where we build the installation, but we are looking to be able to get to a point where anyone who has a valid license for Installshield can get the latest version of the project and then build the project on their computer. Unfortunatly, not everyone has the exact same directory structure which means they have check out the file and then change it to be able to build. I have a number of projects that I am able to do this by using relative variables based on the ISPROJECTDIR variable.

How do we get the project file to assign the correct value to the predefined variables. Any assistance would be appreciated.

Thanks,
Robert M.
Labels (1)
0 Kudos
5 Replies
MichaelU
Pilgrim

Re: ISPROJECTDIR duplicating directory issue.

There is an option when you create the project whether to "Create project file in 'Project Name' subfolder" which influences this. I suspect some of your projects were created with this option selected, and some without.

The easiest way to fix this on an existing project is to open it, then use File > Save As to select (or clear) the check box "Create 'Project Name' subfolder and save the project in the created folder". Adjust the other check boxes according to your needs. (If you'd rather go low level, this option is stored in a table of the .ism, so you might be able to fix it by editing your .ism file's data directly.)
0 Kudos
bobmcm461
Pilgrim

Re: ISPROJECTDIR duplicating directory issue.

Hello Michael,
Thanks for the information. Unfortunalty, this does not fit the situation. The project was fine, and the variables were correct when I created the project. Somehow the problem occurs later in the project's life. The project that I'm working on was correct for months. I only found out about the change when I tried to build. All of a sudden the project wouldn't build, and I am getting errors about not being able to find script files, etc. This is when I look at the predefined variables and find that they are incorrect. I have not been able to figure out a common action that might be causing this problem. It just seems to happen at random.

I tried the Save_As option, but the check box for adding the project name directory was already cleared. I resaved the project and reloaded it but the directory is still incorrect. I don't know if setting, saving and then clearing it would help. I don't want to make it any worse.

I'm not sure how to edit the ISM file directly.

In the case of the project that I am working I have noticed that the ISProjectFolder variable is correct, so as a work around I have changed the type from 1 to 2 on the variables that incorrect, and referenced this variable in them. This at least works around the problem without having to edit the project any time that it might move. I will have to check the other projects to see if that workaround will work with them. It just seems strange that the project works fine and then changes. It's almost like the create project directory flag is getting set in some other place.

Thanks,
Robert M.
0 Kudos
MichaelU
Pilgrim

Re: ISPROJECTDIR duplicating directory issue.

Do you have these projects in source control? If so, it's typically fairly easy to track down what has changed and when. If they're stored in binary format, use InstallShield's MSI Diff; if they're stored as XML, you can use any decent text or XML comparison tool. Most edits can be made in the direct editor, but since ones like these probably won't take effect until save and reload the project I find it easier to recommend editing outside the IDE.

As far as tracking down what causes this to happen, I'm not sure how best to go about that either. Are there multiple machines involved when you see this happen, or are you editing on a single machine? Do you build on the same machine? If multiple machines are involved, does any given machine typically always work the same (either always correct or always incorrect), or do all machines behave identically for a given revision of the project file (first working fine, then after something happens, they all fail identically)? This could help narrow down what kind of setting to look for, between per-project (.ism tables) or per-machine (settings.xml or registry).
0 Kudos
MSherman
Pilgrim

Re: ISPROJECTDIR duplicating directory issue.

Has this been occurring for other people?

Lately i have noticed this as well, when Installshield 2012 Spring opens an existing installer. Please note that this was NOT a change to the file, this is the program opening up an existing installer and sometimes having the duplicate subdirectory. I have gotten it to fix it sometimes (although I can't seem to right now as I'm writing this...) by just reopening it or grabbing it from source control again.

Basically, when you open a file from C:\temp, the ISPROJECTDIR better be C:\temp. That variable is set to the location of the .ism file you opened, but it's coming up with a duplicate temp (in this example).
0 Kudos
David_Worton
Pilgrim

A direct edit in the ISM solved this for me

I had exactly the same problem with an Installshield 11 project which suddenly started exhibiting this behaviour for no readily apparent reason (I had used the "save as" dialog so that is probably implicated somewhere along the line). I absolutely could not resolve this in the UI despite trying the things mentioned on this thread (such as setting an resetting the subdirectory tick box within further "save as" dialog forms). Eventually I was able to track down a difference in the ism between the problem project and an earlier version which solved it.

I had a line like this in the problem project:-

ISPROJECTDIR1

and when I changed it to this:-

ISPROJECTDIR11

the issue was cured. I have no idea what that table entry value of "1" corresponds to, or how to set it in the UI but it seems to cure the problem.
0 Kudos