I’ve done it from a deferred DLL CA using the CreateSymbolicLink() API before.
Blair From: Scott Palmer Sent: Saturday, January 25, 2014 5:32 PM To: General discussion for Windows Installer XML toolset. "runas" seems to be useless for installer purposes. For one: I can't have a console window pop up where a user is forced to enter their password. Second: It may run as a particular user, but not with *all* of their privileges, i.e. not as an Administrator. I'll make it an open challenge.. I've spent a couple days trying. If anyone could confirm one way or the other, if it is possible or impossible to create a symbolic link from an installer with nothing more than the usually UAC prompt appearing. Note that if you run msiexec as an administrator (from a "Run as Administrator" command prompt), then everything works. Obviously that totally ruins the user experience and goes against the whole point of UAC. What is so scary about symbolic links that this is a privileged operation anyway??! It's particularly mysterious since once the symbolic link is created your don't need any special privileges to delete it! Regards, Scott On Fri, Jan 24, 2014 at 10:41 PM, Jeremiahf <jeremi...@gmail.com> wrote: > Interesting... does it not work with removing the quotes from > "[$(var.linkDest)]"' ? btw... I copied your line and there is an extra ' > after "[$(var.linkDest)]". I pasted it in notepad and saw it more clear. > > Check this out. > > http://www.windows7home.net/how-to-create-symbolic-link-in-windows-7/ > > use runas if you need to really need to rock the cmd.exe > > C:\>runas /user:<localmachinename>\administrator cmd.exe /c mklink /D > some_link_name some_directory_path > > > C:\>runas /user:<DomainName>\<AdministratorAccountName> cmd > > ref from: C:\>runas /user:<DomainName>\<AdministratorAccountName> cmd > > cheers > > > > On Fri, Jan 24, 2014 at 4:12 PM, Scott Palmer <swpal...@gmail.com> wrote: > > > Can someone show me code that can successfully do it? > > > > I tried: > > > > <CustomAction Id='Mklink' Directory="myDir" > > ExeCommand='[SystemFolder]cmd.exe /K mklink /D > mylink > > "[$(var.linkDest)]"' Execute="deferred" Impersonate="no" /> > > > > <InstallExecuteSequence> > > <Custom Action="Mklink" > > Before="InstallFinalize">$needALinkForThisComp=3</Custom> <!-- runs at > > install of that Compoent Id --> > > > > </InstallExecuteSequence> > > > > I'm running on Windows 7 > > > > The cmd window that pops up (titled: "Administrator: > > C:\Windows\SysWOW64\cmd.exe") indicates that the System user doesn't have > > permission to make a symbolic link (thanks Microsoft!): > > "You do not have sufficient privilege to perform this operation." > > > > > > Thanks, > > > > Scott > > > > > ------------------------------------------------------------------------------ > > CenturyLink Cloud: The Leader in Enterprise Cloud Services. > > Learn Why More Businesses Are Choosing CenturyLink Cloud For > > Critical Workloads, Development Environments & Everything In Between. > > Get a Quote or Start a Free Trial Today. > > > > > http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk > > _______________________________________________ > > WiX-users mailing list > > WiX-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/wix-users > > > > > > -- > "They may forget what you said but they will never forget how you made them > feel." -- Anonymous > > ------------------------------------------------------------------------------ > CenturyLink Cloud: The Leader in Enterprise Cloud Services. > Learn Why More Businesses Are Choosing CenturyLink Cloud For > Critical Workloads, Development Environments & Everything In Between. > Get a Quote or Start a Free Trial Today. > > http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > ------------------------------------------------------------------------------ CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users