Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Dynamic install files. Need UNC path from SourceDir

5 views
Skip to first unread message

VictorH

unread,
May 12, 2010, 9:44:00 AM5/12/10
to
We have an installer that installs dynamically files (Word documents) which
are located in a subfolder from the setup. We pass Sourcedir to a custom
action. If you run the setup from a mapped drive, the sourcedir is something
like y:\installation\....
but the custom action is run by [NT AUTHORITY\SYSTEM] which is unaware of y:\.
Is there a way to force setup to pass \\server\installation or another trick
to get around this?

--
--
Victor Heijke
Microsoft Certified Professional
Software architect at Flores Automatisering
Amsterdam, the Netherlands
http://www.flores.nl

Wilson, Phil

unread,
May 12, 2010, 1:04:32 PM5/12/10
to
I don't think there's way to do this unless you first do a WNetGetConnection
call non-impersonated to convert it. In any case, the system account
typically has no network privileges so you won't be able to access that
remote location anyway.

You shouldn't really be installing from a mapped drive letter. They're not
system-wide, they're specific to the current user. A product installed for
all users and then used by another user may not even see a Y drive that
Windows will ask for if it needs to access the original install MSI file.
--
Phil Wilson


"VictorH" <Vic...@discussions.microsoft.com> wrote in message
news:3DDCDEB8-09B8-4C4C...@microsoft.com...

VictorH

unread,
May 14, 2010, 3:47:01 AM5/14/10
to
> You shouldn't really be installing from a mapped drive letter.

I agree to that, but tell that to our cliënts who use our software.
Stupid thing is that the setup itself (installing the dll's etc.) is fully
working, but passes the SourceDir with drivemapping to another user account.
Seems a design misstake in Windows Installer :-(

Anyone an idea how to get the UNC path in sourcedir when installing from a
drivemapping?

Wilson, Phil

unread,
May 17, 2010, 2:25:08 PM5/17/10
to
You basically need to get your own code in there as a bootstrapper or
otherwise run something after the install which basically:

1. Uses WNetGetConnection to convert the drive to a UNC path.

2. Use the Windows Installer APIs MsiSourceListClearAll () to delete the
drive letter and MsiSourceListAddSource () to add the UNC path.

--
Phil Wilson
The Definitive Guide to Windows Installer
http://www.apress.com/book/view/1590592972


"VictorH" <Vic...@discussions.microsoft.com> wrote in message

news:2DCDFDAA-3B5C-4093...@microsoft.com...

0 new messages