This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Check for directory on mapped network drive
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 21, 2011
10:32 AM
Check for directory on mapped network drive
I have an InstallScript function that checks if a directory exists in a location relative to the MSI file. When I run the installer from a location on a network drive I have mapped to my local machine, it fails to find the directory.
I have tried using both
and
and both return false if the directory it's looking for is located on a mapped network drive (located off the target machine). The directory exists, I can copy the path that is passed into the function and access it myself. The MSI I'm launching is also located on the same mapped drive when this occurs.
Is there a way to check if a directory exists or not in InstallScript even if it's located outside the target machine?
I have tried using both
ExistsDir(SourceDir^myDirectory)
and
Is(PATH_EXISTS, SourceDir^myDirectory)
and both return false if the directory it's looking for is located on a mapped network drive (located off the target machine). The directory exists, I can copy the path that is passed into the function and access it myself. The MSI I'm launching is also located on the same mapped drive when this occurs.
Is there a way to check if a directory exists or not in InstallScript even if it's located outside the target machine?
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 21, 2011
12:02 PM
Hi There,
This sort of thing gets messy not from InstallScript specifically, but in general from custom actions. There's 2 things that complicate this:
1. In Vista and newer, drives mapped or shares with a session opened from a non-admin token aren't accessible to Elevated processes, which have a separate set of sessions and mappings by default. There's a system policy that (after a restart) will link the two sets:
http://support.microsoft.com/kb/937624
2. Custom actions running Deferred in System Context will fail to access network shares because they are running under the SYSTEM account, or in SMB terminology a 'NULL User' which has been disallowed for some time in windows. You have to do this with regular Deferred custom actions (with Terminal Server Aware set), or with an Immediate action.
This sort of thing gets messy not from InstallScript specifically, but in general from custom actions. There's 2 things that complicate this:
1. In Vista and newer, drives mapped or shares with a session opened from a non-admin token aren't accessible to Elevated processes, which have a separate set of sessions and mappings by default. There's a system policy that (after a restart) will link the two sets:
http://support.microsoft.com/kb/937624
2. Custom actions running Deferred in System Context will fail to access network shares because they are running under the SYSTEM account, or in SMB terminology a 'NULL User' which has been disallowed for some time in windows. You have to do this with regular Deferred custom actions (with Terminal Server Aware set), or with an Immediate action.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 21, 2011
01:31 PM
Thanks.
After doing some research I came across both of these points and realized they both will cause problems with my install 😞
After doing some research I came across both of these points and realized they both will cause problems with my install 😞