Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
SetVolumeLabel由于 Windows 7 上的访问被拒绝错误,功能失败。
SetVolumeLabel
相同的功能在 Windows XP 上运行良好。
知道为什么这个问题出现在 Windows 7 上而不是 XP 上。
任何帮助将不胜感激,对我们非常有帮助。
Windows Vista 和 Windows 7 具有用户帐户控制或 UAC。这意味着除非针对特定操作或应用程序请求,否则用户没有管理员权限。在 Windows XP 下,如果用户是管理员,则所有程序都以管理员权限运行。
您收到的错误表明SetVolumeLabel需要提升权限。您可以使用“runas”以管理员身份运行应用程序,也可以更改程序以请求提升。