[wix-users] Using user's home directory as working directory (a.k.a startup directory) for shortcuts

Clifford Yapp cliffyapp at gmail.com
Tue Jan 5 07:33:03 PST 2021


I was actually hoping to use something like %USERPROFILE% as the "Start In"
directory - setting this manually in Windows on the link files appears to
do what I would expect.

Thanks,
Cliff

On Tue, Jan 5, 2021 at 10:26 AM Herman van Drie <hvandrie at outlook.com>
wrote:

> Yapp,
>
> I imagine shortcuts are created in user's profile Start Menu?
> I actually don't understand why you cannot retrieve user's home directory
> from the application. Very dangerous to have a static user home directory
> as you cannot have an environment variable for a working directory in a
> shortcut to my knowledge. So, I wouldn't even try it to make it a static
> working directory in a shortcut. Very uncommon approach, only asking for
> more issues.
>
> Regards,
>
> Herman
>
> -----Original Message-----
> From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of
> Clifford Yapp via wix-users
> Sent: dinsdag 5 januari 2021 16:21
> To: wix-users at lists.wixtoolset.org
> Cc: Clifford Yapp <cliffyapp at gmail.com>
> Subject: [wix-users] Using user's home directory as working directory
> (a.k.a startup directory) for shortcuts
>
> Hi!  I'm trying to create a WiX installer for a project using CMake, and
> I'm hitting a rather thorny problem.
>
> For a number of reasons, we would prefer our user facing GUI applications
> being launched from shortcuts to start with a working directory equivalent
> to the user's home directory.  The NSIS installer allows this, but thus far
> I have not figured out how to do it with WiX.
>
> The closest I have found so far is the work on Powershell's installer (
>
> https://discourse.cmake.org/t/cpack-wix-setting-working-directory-for-desktop-and-menu-shortcuts/1846
> )
> but it looks like that was subsequently reverted as not working.
>
> Is there a standard way in WiX to set the working directory of shortcuts
> to the user's home directory?  CMake in principle offers a mechanism to
> patch or augment WiX logic, but so far I've not even been able to identify
> a working solution to try to integrate.
>
> Thanks for any assistance,
> CY
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>



More information about the wix-users mailing list