I was just coming in to correct the path...

The problem you're having is that the Directory attribute is supposed to be
the ID of a directory, not the path to a directory.

Here's how I'm dealing with absolute paths. My standard disclaimer with WiX
advice is that I first used WiX in November and I still don't feel like I
know what I'm doing, so there may be a much easier way to do anything.


<CustomAction Id="CA_SetCDrive" Directory="C_DRIVE" Value="c:\" />

<InstallExecuteSequence>
<Custom Action="CA_SetCDrive" After="CostFinalize" />
</InstallExecuteSequence>

<Directory Id="TARGETDIR" Name="SourceDir">
    <Directory Id="C_DRIVE" Name="CDrive">
<Directory Id="DIR_PROGRAMDATA" Name="ProgramData" >
    <Directory Id="DIR_MICROSOFT" Name="Microsoft" >
<Directory Id="DIR_POINTOFSERVICE" Name="Point of Service" >
    <Directory Id="DIR_CONFIGURATION" Name="Configuration" />
</Directory>
</Directory>
</Directory>
</Directory>
</Directory>

Then, assuming you got all the rest of your values right, you would have:

   <Shortcut Id="MYShortcut" Name="MyApp"
          Description="Launch MyApp"
          Target="[ProgramDir]MYApp.exe" WorkingDirectory="ProgramDir"
          Icon="icon.ico" Directory="DIR_CONFIGURATION"/>

and your shortcut would land in c:\ProgramData\Microsoft\Point of
Service\Configuration. (Not a sensible place to put a shortcut, of course,
but it's the snippet I could steal easily.)

I assume that you have an <icon .... /> element with Id="icon.ico" because
I think that's an ID as well. I've never done a shortcut or icon in WiX,
though. We don't even have the explorer shell running. We have a custom
shell that has it's own way of doing Startup and RunOnce.

Good luck-

Walt



On Thu, Feb 20, 2014 at 8:47 AM, <paul.chor...@stfc.ac.uk> wrote:

> Hello Ilir,
>
> Thanks for your response, how do I add a shortcut to that path in WIX
> (C:\Users\<TheUser>\AppData\Roaming\Microsoft\Windows\Start
> Menu\Programs\Startup)?
>
> Cheers,
> Paul
>
> -----Original Message-----
> From: Ilir Bekteshi [mailto:ilir...@gmail.com]
> Sent: 20 February 2014 13:22
> To: General discussion about the WiX toolset.
> Subject: Re: [WiX-users] Adding Application Shortcut to Specific User's
> Startup Folder.
>
> If you want your Shortcut to appear in Startup folder for everyone then
> put it in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
>
> For a specific user then
> C:\Users\<TheUser>\AppData\Roaming\Microsoft\Windows\Start
> Menu\Programs\Startup
>
>
>
>
> On Thu, Feb 20, 2014 at 1:06 PM, <paul.chor...@stfc.ac.uk> wrote:
>
> > Hello,
> >
> > I have a kiosk type PC system, that on boot up, automatically logs on
> > a special restricted user account with a preconfigured password. My
> > application then launches automatically using a shortcut present in
> > only that special users Startup folder. The installation scope is per
> > machine as other users may need to run the application from time to
> > time for diagnostic purposes. The application installation is always
> > done using an admin account.
> >
> > In the past using VS2010:-
> >
> > 1.       The solution MS "Setup Project" installed all of the common
> > features successfully.
> >
> > 2.       I utilized the MS "Installer Class" which through some c# code
> > created an application shortcut in the special user's startup folder
> > during installation and removed it during uninstallation.
> >
> > With the demise of the above VS2010 features in later VS versions I
> > have just over the last two weeks looked at WIX as an alternative. So
> > far the WIX project will successfully install & uninstall the common
> > features successfully, that is DLL, EXE files and some simple all user
> > application shortcuts on the desktop and start menu.
> >
> > After searching for ages, I cannot determine how to set a startup
> > shortcut in just the special user account. From my searches this does
> > not appear to possible just using the basic WIX.
> >
> > I would really appreciate some directional guidance. Maybe a "C#
> > custom action project" should be used? Or a batch file?
> >
> > Cheers,
> > Paul
> >
> >
> > --
> > Scanned by iCritical.
> >
> >
> > ----------------------------------------------------------------------
> > -------- Managing the Performance of Cloud-Based Applications Take
> > advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> > Read the Whitepaper.
> >
> > http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.
> > clktrk _______________________________________________
> > WiX-users mailing list
> > WiX-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> >
>
> ------------------------------------------------------------------------------
> Managing the Performance of Cloud-Based Applications Take advantage of
> what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
> --
> Scanned by iCritical.
>
>
> ------------------------------------------------------------------------------
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to