The Temp folder is on a drive that is full or is inaccessible

今天遇到一个客户在安装 . NET Framework 4.5.2的时候遇到了这样的报错:“Final Result: Installation failed with error code: (0x80070660), "The Temp folder is on a drive that is full or is inaccessible. Free up space on the drive or verify that you have write permission on the Temp folder. " (Elapsed time: 0 00:01:04).””

从错误信息上看,似乎是因为temp文件夹没有权限访问或是磁盘空间不够了,于是清理磁盘空间,用disk cleanup tool清理temp文件,并且尝试了在%temp%以及“%windir%”\temp文件夹中删除文件,发现都具有权限。
在这里插入图片描述

可是再次安装 .NET Framework 4.5.2依然失败,还是报这样的错。然后检查了VS log 发现了如下的错误

MSI (s) (38:B8) [13:27:35:229]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
MSI (s) (38:B8) [13:27:35:229]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
MSI (s) (38:B8) [13:27:35:230]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\InProgress 3: 2 
MSI (s) (38:B8) [13:27:35:230]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\InProgress 3: 2 
MSI (s) (38:B8) [13:27:35:230]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1
MSI (s) (38:B8) [13:27:35:230]: Restoring environment variables
MSI (c) (DC:54) [13:27:35:235]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1
MSI (c) (DC:54) [13:27:35:235]: MainEngineThread is returning 1632

查询了错误代码1632,发现依然指向“The Temp folder is on a drive that is full or is inaccessible. ”

经过网上查询,发现其实除了 .NET Framework之外,还有其他的app安装时候也会遇到这个问题,可见这并不是一个 .NET 安装的问题, 而是系统的问题。原来在系统盘中有一个c:\windows\installer文件夹,这是windows installer的文件夹,里面有安装msi文件所需的缓存文件。这个文件夹非常重要,处于系统保护和隐藏之下,轻易不应该去修改这个文件夹。
在这里插入图片描述
同时这个文件夹比较大,有些人为了节约系统盘的空间,有时会将这个文件夹移到别处并进行redirect操作。(具体细节请百度)于是查询客户的机器上,果然这个文件夹被移走了,只剩下一个shortcut快捷方式。于是删除这个快捷方式,并且重建了一个c:\windows\Installer的文件夹,然后 .NET Framework就可以顺利安装了。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值