Inno Setup "The drive or UNC share you selected does not exist or is not accessible",为什么?



我在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:UsersAliDocumentsrninstaller.exe
2012-11-11 14:09:21.992   Setup command line: /SL5="$9049C,86159698,54272,C:UsersAliDocumentsrninstaller.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:UsersAliAppDataLocalTempis-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.

我看不出这里发生了什么。谁能帮忙?

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

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

正如问题注释中所解决的那样,问题中的安装脚本具有硬编码DefaultDirName该由客户端站点上不存在的服务器名称组成。这会导致"您选择的驱动器或 UNC 共享不存在或无法访问">错误。这就是为什么DefaultDirName通常"以目录常量为前缀"。

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

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

继续ComputerHKEY_LOCAL_MACHINESOFTWAREWOW6432NodeMicrosoftWindowsCurrentVersionUninstall并扫描引用软件卸载可执行文件的条目。把它打死,整个关键。然后 - 尝试再次安装程序。

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

  • ComputerHKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionUninstall
  • ComputerHKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionUninstall
  • ComputerHKEY_USERS.DEFAULTSoftwareMicrosoftWindowsCurrentVersionUninstall
  • ComputerHKEY_USERSS....SoftwareMicrosoftWindowsCurrentVersionUninstall

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

相关内容

最新更新