[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.setup

Dynamic install files. Need UNC path from SourceDir

VictorH

5/12/2010 1:44:00 PM

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...
3 Answers

Wilson, Phil

5/12/2010 5:05:00 PM

0

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" <VictorH@discussions.microsoft.com> wrote in message
news:3DDCDEB8-09B8-4C4C-B339-E5F3AC334310@microsoft.com...
> 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...

VictorH

5/14/2010 7:47:00 AM

0

> 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

5/17/2010 6:25:00 PM

0

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/...


"VictorH" <VictorH@discussions.microsoft.com> wrote in message
news:2DCDFDAA-3B5C-4093-8C56-B81EB6FB2CAF@microsoft.com...
>> 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?
>