当网络驱动器上安装了目录时,Windows Installer 无法访问网络位置

Tom*_*Vee 1 windows installation networking directory-structure visual-studio-2010

我有一个在 Visual Studio 2010 中构建的 C++ Windows 应用程序,其中有一个安装项目来创建一个 .msi,当用户拥有本地My Documents文件夹时,该应用程序可以正常安装,但当用户的My Documents文件夹位于网络驱动器上时,该应用程序会安装失败。

在本地安装时,安装程​​序会在其文件夹中创建Project和文件夹,但是当我尝试在网络位置安装到系统时,.msi 失败并显示错误消息。查看安装程序日志文件,似乎是在安装程序创建描述和目录的属性时发生故障,而不是在尝试创建和填充这些目录时发生故障。DataMy DocumentsMy Documentscannot access network locationProjectData

有人知道如何避免、解决此错误或从该错误中恢复吗?

现在,对于网络上具有“我的文档”的系统,安装会失败并回滚。谢谢。

来自 MSI 日志:

"The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2835. The arguments are: ErrorIcon, ErrorDialog, 
Error 1606. Could not access network location \\TOMVEE-W7PC\Users\W8RemoteUserDocs\\eQUEST 3-65 Projects\.
MSI (c) (38:64) [13:13:34:987]: Note: 1: 2262 2: Error 3: -2147287038 
MSI (c) (38:64) [13:13:34:987]: Product: eQUEST 3-65 -- Error 1606. Could not access network location \\TOMVEE-W7PC\Users\W8RemoteUserDocs\\eQUEST 3-65 Projects\.

MSI (c) (38:64) [13:13:34:989]: Note: 1: 1314 2: \\TOMVEE-W7PC\Users\W8RemoteUserDocs\\eQUEST 3-65 Projects\ 
MSI (c) (38:64) [13:13:34:989]: Note: 1: 1606 2: \\TOMVEE-W7PC\Users\W8RemoteUserDocs\\eQUEST 3-65 Projects\ 
MSI (c) (38:64) [13:13:34:989]: Note: 1: 2262 2: Error 3: -2147287038 
MSI (c) (38:BC) [13:13:34:991]: Note: 1: 2262 2: Error 3: -2147287038 
DEBUG: Error 2835:  The control ErrorIcon was not found on dialog ErrorDialog
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2835. The arguments are: ErrorIcon, ErrorDialog, 
Error 1606. Could not access network location \\TOMVEE-W7PC\Users\W8RemoteUserDocs\\eQUEST 3-65 Projects\.
MSI (c) (38:64) [13:13:39:006]: Note: 1: 2262 2: Error 3: -2147287038 
MSI (c) (38:64) [13:13:39:006]: Product: eQUEST 3-65 -- Error 1606. Could not access network location \\TOMVEE-W7PC\Users\W8RemoteUserDocs\\eQUEST 3-65 Projects\.

MSI (c) (38:64) [13:13:39:007]: Note: 1: 1606 2: \\TOMVEE-W7PC\Users\W8RemoteUserDocs\\eQUEST 3-65 Projects\ 
MSI (c) (38:64) [13:13:39:007]: Note: 1: 2262 2: Error 3: -2147287038 
MSI (c) (38:BC) [13:13:39:009]: Note: 1: 2262 2: Error 3: -2147287038 
Run Code Online (Sandbox Code Playgroud)

我认为丢失的错误图标不相关,但也许?

Tom*_*Vee 5

无论是只为我安装还是为所有用户安装,都会出现此问题。

我做了一个小应用程序来测试权限并更新它们(如果不充分),但这仍然没有解决问题。

但是,在手动测试过程中,我发现目录路径中间的额外“\”导致了问题,例如“\TOMVEE-W7PC\Users\W8RemoteUserDocs\eQUEST 3-65 Projects”。出现这个额外的斜杠是因为安装项目属性中用于文件夹默认位置的 [PersonalFolder] 已经生成了一个“\”,然后我还在属性值中添加了一个斜杠。这个额外的斜杠不会在本地安装中引起问题,但在网络位置上的安装中引起问题,可能是因为“\”在网络目录中具有其他含义。

所以问题是错误构建的目录路径,而不是权限。只是发布这个答案是因为其他人正在努力解决同样的问题。

感谢回复者,汤姆