View Full Version : Problems adding files to Shared Documents

09-09-2011, 05:34 AM
I have been using Installshield Express 2008 for some time and hit a problem so I decided to try the 2012 release (as a trial) and the same thing happens...

We need to create a installation which includes samples for our product. Previously we used to include these in <COMPANY><PROGRAMS><PRODUCT>\Samples but with Vista and W7 this either meant customers copying them or changing access rights to this folder. The samples are a 100MB or so.

We want to be able to install these samples into shared documents so anyone can access and change them (This is what our particular customers want).

In both IS 2008E and IS 2012E I always get files installed into C:\Samples whenever I try to use [ALLUSERSPROFILE]\Samples - I have tried pretty hard to fix this having followed the various threads on this forum - I have tried VBscript Custom actions to set ALLUSERS=1 and can read and write the ALLUSERSPROFILE property correctly but the samples still always end up on C:\Samples. I have tested the install on completely clean XP and pretty clean Vista and W7 installations and they all do the same thing.

Could anyone suggest why Installshield chose not to provide a [CommonDocuments] or similar and why ALLUSERSPROFILE does not work for me?

Thanks in anticipation.

09-13-2011, 04:38 PM
The ALLUSERSPROFILE property is typically set to the value of the ALLUSERSPROFILE environment variable on a target machine, which is only available in the per-machine context. A built-in property equivalent of the CSIDL_COMMON_DOCUMENTS folder is not currently available. You might want to consider writing your own custom action that sets a property to the Common Documents folder using the SHGetFolderPath Function (http://msdn.microsoft.com/en-us/library/bb762181(v=vs.85).aspx).

09-14-2011, 05:16 AM
Hi, Thanks for your reply. The problem I have is that the ALLUSERSPROFILE just doesn't work for me; All files end up in c:\

If I write out a message-box in a VBScript custom action as follows...

sTmp = Session.Property( "ALLUSERSPROFILE" )
Msgbox "ALL USERS PROFILE = " & sTmp

then the message-box says "C:\Documents and Settings\All Users", however the files still end up on c:\

I have also tried writing to the ALLUSERSPROFILE and this has no effect either.

I have tried installing for all users and for a named used but no change here either - Does ALLUSERSPROFILE work for you OK?

09-14-2011, 05:41 AM
OK. I have just tried a completely new project with just a couple files in it and ALLUSERSPROFILE works as expected.

I seems as though my main project has something in it that breaks the "ALLUSERSPROFILE" - Is there a project consistency checker I can use to check my .ISE file ?

Perhaps I will create a new project with the same files and settings as my main project and try again.

09-14-2011, 08:34 AM
The first thing I would do is to create a Windows Installer verbose log for your installation and check if it runs in the per-machine installation context. Refer to http://msdn.microsoft.com/en-us/library/dd765197(v=vs.85).aspx for more details about the Windows Installer Installation Context.

10-06-2011, 11:47 AM
Thanks for your suggestions and sorry to take so long to come back but I have had other issues - I couldn't see anything particularly useful in the log however I have now solved the issue.

I simply re-created my installation from scratch, manually copying settings, links to files, GUIDs etc as I went. Luckily, you can run two copies of ISE on two monitors. The Installshield database must have had some kind of error in it as this now works in both 2012 and 2008 - I am a little surprised that the file was considered valid though.

Thanks again for your help.