为什么无法播放网络驱动器(NAS)上的视频

有的用户反馈恒星无法播放网络驱动器(比如 NAS) 上的视频,表现为:

  • 通过恒星播放器打开文件,看不到网络驱动器的盘符;
  • 双击 NAS 上的视频文件打开可播放器但是文件未加入播放列表;

这种情况是由于系统权限限制导致的。一般出现在刚安装播放器首次运行时,具体原因是:安装完成播放器后,通过“立即体验”按钮来启动播放器,此时播放器是由安装程序启动的,继承了它的 elevated context (以管理员权限运行 Run as administrator)。在 Windows 平台下,不同权限是以不同会话登陆到系统的,网络驱动器的映射关系不会跨会话共享,所以此时播放器中无法看到网络驱动器。

参见

Mapped drives are not available from an elevated prompt when UAC is configured to Prompt for credentials

解决方法

解决方法很简单,通过主菜单或者右下托盘菜单退出恒星播放器,然后再双击恒星播放器或视频(此时播放器是以普通用户权限启动的)就能正常播放了。


如果有需要希望在管理员权限下也能访问网络驱动器,有两个办法:

1)修改组策略

In Local Group Policy Editor, locate the following Group Policy path:
Local Computer Policy\Windows Settings\Security Settings\Local Policies\Security Options

Configure the following policy to Prompt for consentUser Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode

2)在管理员权限下重新映射网络驱动器

比如使用批处理命令:

net use s: \\192.168.1.100\\share /user:guest 123456 /y