1. For your first question, the answer is in the MSI SDK for the 
Shortcut table's WkDir column (which Shortcut/@WorkingDirectory) maps to:

WkDir

    The name of the property that has the path of the working directory
    for the shortcut. The value can use the Windows format to reference
    environment variables, for example %USERPROFILE%. The references are
    resolved to an actual path when the installer resolves the working
    directory to create the shortcut.

2. For your second question, there is no such thing as "the folder that 
resolves to the TEMP folder for any given user". There is %TEMP% (which 
should usually be set) that gets updated when the user logs in. But 
based on the behavior above, it looks like the Windows Installer is 
going to resolve the path for you know matter what.  That's pretty annoying.


Brad wrote:
> Hi.  This is no doubt a very basic question, but I've had a look around
> and experimented and haven't been able to find a solution, so I'd appreciate
> any help.
>
> I'm using WiX 3.0 and have set ALLUSERS=1 so I can get a 'per-machine'
> install, with the application installing its shortcuts and program menu
> items for *all* users on the machine:
>
> <Property Id='ALLUSERS' Value='1' />
>
> What I'd like to do is have the application run with its current working
> directory set to the user's %TEMP%; i.e. for user JOE it would run with
> the current directory set to:
>
> C:\Documents and Settings\JOE\Local Settings\Temp
>
> but when FRED runs it the program will have as its current working
> directory:
>
> C:\Documents and Settings\FRED\Local Settings\Temp
>
> How do I do this please?
>
> If I have this:
>
>  <Shortcut Id="AppMenuShortcut" ...  WorkingDirectory='WORKINGDIR' />
> ...
> <Property Id='WORKINGDIR' Value='%Temp%' />
>
> then every user's shortcut has a 'Start In' directory value (in the
> 'Properties' for the shortcut) of the value for %Temp% of the user
> who installed the application.  I.e. '%Temp%' is resolved at installation
> time.
>
> I just want to have the literal '%Temp%' configured as the value for
> 'Start In' for the shortcuts.  I used '%%Temp%%' in the Property clause,
> hoping that '%%' would escape the meaning of a '%' character, but
> it had no effect; WiX still resolved it at installation time to the fixed
> value of the user who performed the installation.  Doing '\%Temp\%'
> resulted in that exact string - including the backslash characters -
> from being set, which doesn't work.  I can't find, on the web, an
> '&amp;' style of expression for '%'.
>
> It's probably a very simple solution - how to place the literal string
> '%TEMP%' in the shortcut property?
>
> While I'm here, if I can ask a more general question ... when I first studied
> up on WiX (a fair while ago) I'd have thought that the System Folder
> Properties - 'AppDataFolder', 'TempFolder' and the like - might have been
> exactly what I wanted.  But instead they, too, all resolve to the fixed
> value for the user who installs the application.  I.e. if JOE installs the
> program and the WORKINGDIR is set to be 'AppDataFolder' then all the other
> users also try and start up in JOE's folder.
>
> Is there a proper System Folder Property that's meant to be used for
> 'the temporary/data folder for the user who is running the program at the
> time, not the user who installed it'?  Or a better way in WiX to do what
> I'm after?
>
> Many thanks for any help,
>
>
> Brad
>
> ------------------------------------------------------------------------------
> Are you an open source citizen? Join us for the Open Source Bridge conference!
> Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
> Need another reason to go? 24-hour hacker lounge. Register today!
> http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>   

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to