VMware Cloud Community
gregsimpson
Contributor
Contributor

Network drives not seen in InstallBuilder.

I am trying to ask for a folder that is on a UNC share.

The UNC path is: O:\ and it maps to \\localhost\c$\test which is valid.

This folder refuses to show up in the list if I ask for a folder and the program will just not verify that anything at all is in the folder. I have also just asked for a string that is the drive letter an path. This also fails. I have tried everything I know to ask for and validate the contents of the UNC path. It is like InstallBuilder purposefully ignores all UNC paths.

<stringParameter>
<name>serverFolder</name>
<title>Shared Folder</title>
<description>Enter the Drive and Share folder</description>
<explanation></explanation>
<value></value>
<default></default>
<allowEmptyValue>1</allowEmptyValue>
<ruleEvaluationLogic>or</ruleEvaluationLogic>
<width>40</width>
<validationActionList>
<throwError>
<text>Invalid Folder</text>
<ruleList>
<fileTest>
<condition>is_not_directory</condition>
<path>${serverFolder}</path>
</fileTest>
</ruleList>
</throwError>
</validationActionList>
</stringParameter>

 

Reply
0 Kudos
3 Replies
michieldhont_
Hot Shot
Hot Shot

Hi @gregsimpson,

This is a known issue which is not related to InstallBuilder. Mapped drives are created on a user scope, and as the installers are run with administrator privileges the network drives are not accessible. You can read more about the issue here:

https://docs.microsoft.com/en-US/troubleshoot/windows-client/networking/mapped-drives-not-available-...

A workaround would be to write a bat script that mounts the drive as an administrator. It is explained in further detail here:

https://superuser.com/questions/232986/map-to-drive-on-server-with-bat-file

Would that work for you?

Regards,

Michiel

Reply
0 Kudos
gregsimpson
Contributor
Contributor

HI,

Sorry, no, that would not help. The issue is that I need to see the contents of the UNC drive of the currently logged in user. That user is the one that installs the software. That user has persistent drive connections, so that user will always see that UNC path.

I do not have any clue as to what this is sharing, and yes, I still need to do administrative things, so need the admin context.

All I want to know is:

1. Does the drive/folder exist?

2. Does the folder have a certain file that I can copy to the local drive?

3. Copy file.

If you have any suggestions I would be grateful.

Reply
0 Kudos
michieldhont_
Hot Shot
Hot Shot

Hi @gregsimpson,

Unfortunately, as mentioned in the msdn article, if you run under the UAC, the network drives won't be mapped (unless they were also mapped as Administrator). You could type it directly into the text entry:

\\localhost\c$\test

Or using the browse dialog, navigating through Network > localhost > ..., but the mapped path "O:\..." wont work.

This is similar to the results you would obtain from an administrator cmd.exe. You will be able to do:

dir \\localhost\c$\test


But not:

dir O:


While both commands will work from a regular (non-elevated) cmd.exe

Regards,

Michiel

Reply
0 Kudos