自定義url協(xié)議只能用管理員權(quán)限?不用管理員權(quán)限是否可行?
代碼:
var surekamKey = Microsoft.Win32.Registry.ClassesRoot.CreateSubKey("hello");
//以下這些參數(shù)都是固定的,不需要更改,直接復(fù)制過(guò)去
var shellKey = surekamKey.CreateSubKey("shell");
var openKey = shellKey.CreateSubKey("open");
var commandKey = openKey.CreateSubKey("command");
surekamKey.SetValue("URL Protocol", "");
錯(cuò)誤信息:
System.UnauthorizedAccessException: Access to the registry key 'HKEY_CLASSES_ROOT\hello' is denied.
我用管理員權(quán)限運(yùn)行沒(méi)這個(gè)問(wèn)題
小伙看你根骨奇佳,潛力無(wú)限,來(lái)學(xué)PHP伐。
什么操作系統(tǒng)?
Win7之后的系統(tǒng)使用了UAC機(jī)制,你可以設(shè)置程序默認(rèn)使用管理員權(quán)限運(yùn)行
http://www.veryhuo.com/a/view/35011.html
微信掃碼
關(guān)注PHP中文網(wǎng)服務(wù)號(hào)
QQ掃碼
加入技術(shù)交流群
Copyright 2014-2025 http://ipnx.cn/ All Rights Reserved | php.cn | 湘ICP備2023035733號(hào)