2

我在 Inno Setup 中编写了一个应用程序来在用户 PC 上安装文件。当我在 Mac 上运行的 Parallels 中的 XP 上测试它时,该应用程序运行良好。但是当用户尝试在 Xp 和 7 中安装时,他们会进入向导并开始安装,然后收到以下消息:

Error. The drive or UNC share you selected does not exist or is not accessible

我现在已经设法获取程序生成的日志文件:

2012-11-11 14:09:21.992   Log opened. (Time zone: UTC+00:00)

2012-11-11 14:09:21.992   Setup version: Inno Setup version 5.5.2 (a)

2012-11-11 14:09:21.992   Original Setup EXE: C:\Users\Ali\Documents\rninstaller.exe

2012-11-11 14:09:21.992   Setup command line: /SL5="$9049C,86159698,54272,C:\Users\Ali\Documents\rninstaller.exe" /SPAWNWND=$D049A /NOTIFYWND=$140476 /log="rnlog"

2012-11-11 14:09:21.992   Windows version: 6.1.7601 SP1  (NT platform: Yes)

2012-11-11 14:09:21.992   64-bit Windows: Yes

2012-11-11 14:09:21.992   Processor architecture: x64

2012-11-11 14:09:21.992   User privileges: Administrative

2012-11-11 14:09:21.992   64-bit install mode: No

2012-11-11 14:09:21.992   Created temporary directory: C:\Users\Ali\AppData\Local\Temp\is-MQ2FF.tmp

2012-11-11 14:09:28.201   RestartManager found an application using one of our files: ?O?O?O?I?O?O?O?I?O?O?O?O?O?O?O?O?O?O?O?O?O?O?O?O?O?O?O?ODO?O?O?O?O?I?I?I?I?I?I?I?I?I?I?I?I?I?I?I?I?I?I?I?I?I?I?I?I?I?O?O?O?O?O?O?O?O?O?I?I?i

2012-11-11 14:09:28.201   RestartManager found an application using one of our files: 

2012-11-11 14:09:28.201   RestartManager found an application using one of our files: 

2012-11-11 14:09:28.201   RestartManager found an application using one of our files: 

2012-11-11 14:09:28.201   RestartManager found an application using one of our files: 

2012-11-11 14:09:28.201   Can use RestartManager to avoid reboot? No (262758)

2012-11-11 14:09:28.201   Message box (OK):
                          The drive or UNC share you selected does not exist or is not accessible. Please select another.

2012-11-11 14:09:31.592   User chose OK.

2012-11-11 14:09:31.592   Deinitializing Setup.

2012-11-11 14:09:31.592   Log closed.

我看不到这里发生了什么。任何人都可以帮忙吗?

4

3 回答 3

2

由于不同的原因,我收到了这个错误。我的脚本没有任何硬编码路径,UNC 或其他。这是在 Windows 10 机器上。我已将应用程序安装在闪存驱动器上,但后来尝试在 PC 上安装另一个版本时,闪存驱动器不存在。安装失败,因为 Windows 无法卸载以前的版本,并且 Inno 安装程序正在尝试更新已安装的版本。要检查这一点,请打开控制面板并选择程序和功能。如果您的应用程序的某个版本已安装,请尝试将其卸载。如果失败,那么您的设置将给出 OP 记录的相同错误。

我希望这对遇到此问题的其他人有所帮助。

于 2020-06-25T12:13:32.883 回答
1

正如对问题的评论所解决的那样,问题中的设置脚本具有硬编码DefaultDirName,其中包含客户端站点上不存在的服务器名称。这导致“您选择的驱动器或 UNC 共享不存在或不可访问”错误。这就是为什么DefaultDirName最常见的“以目录常量为前缀”的原因。

于 2012-11-15T09:37:10.850 回答
0

对于在这篇文章中寻找“驱动程序或 UNC 共享不存在”问题的解决方案的任何其他人,我发现问题可以追溯到上次安装的剩余部分,特别是卸载可执行文件。

如果您不再拥有卸载可执行文件,并且 Windows 10“添加或删除程序”无法卸载(可能是由于缺少uninst.exe),您可以尝试进行一些注册表黑客以使其安装。

继续Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\并扫描引用您的软件的卸载可执行文件的条目。把它弄死,整个钥匙。然后 - 尝试再次安装您的程序。

卸载密钥还有另一个位置:

  • Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\
  • Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
  • Computer\HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Uninstall
  • Computer\HKEY_USERS\S....\Software\Microsoft\Windows\CurrentVersion\Uninstall

您可能还想在这些地方查找条目。

于 2021-01-26T13:45:08.837 回答