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

时间:2014-03-04 22:05:20

标签: windows visual-studio-2010 networking installer directory-structure

我在Visual Studio 2010中构建了一个C ++ Windows应用程序,其中包含一个安装项目,用于创建一个.msi,当用户拥有本地My Documents文件夹时安装得很好,但是当找到My Documents文件夹时失败在网络驱动器上。

在本地安装时,安装程​​序会在Project文件夹中创建DataMy Documents个文件夹,但当我尝试在网络位置安装My Documents的系统时, .msi失败并显示cannot access network location错误消息。查看安装程序日志文件时,如果安装程序正在创建描述ProjectData目录的属性,而不是在尝试创建和填充这些目录时,则会出现故障。

有没有人知道如何避免,解决方法或从此错误中恢复?

现在安装失败并回滚到网络上带有My Documents的系统。感谢。

来自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 

我不认为缺少错误图标是相关的,但也许?

1 个答案:

答案 0 :(得分:3)

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

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

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

所以问题是错误构造了目录路径,而不是权限。只是在一个奇怪的机会上发布这个答案,其他人正在努力解决同样的问题。

感谢响应者, 汤姆

相关问题