cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sclarke
Level 3

Problems adding files to Shared Documents

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 \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.
Labels (1)
0 Kudos
(5) Replies
hidenori
Level 17

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.
0 Kudos
sclarke
Level 3

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...

[FONT="Courier New"]sTmp = Session.Property( "ALLUSERSPROFILE" )
Msgbox "ALL USERS PROFILE = " & sTmp
[/FONT]

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?
0 Kudos
sclarke
Level 3

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.
0 Kudos
hidenori
Level 17

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.
0 Kudos
sclarke
Level 3

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.
0 Kudos