English 中文(简体)
登记许可问题
原标题:Registry permission question for win7-64 c# development
  • 时间:2009-11-20 13:13:09
  •  标签:
  • registry

vs2008, c#:第一次,我得票,需要安装在LM KongSoftware。 许可显然是一个问题,但要求是用户可能没有行政权利,因此不可能对最终用户进行人工许可。 在安装期间,我可以创建钥匙,但从方案看,是否有什么办法这样做?

登记册Key 钥匙 = 书记官处. LocalMachine.Create SubKey(@“SoftwareMyCompanyMyApp1.0”);

Just testing the app from vs2008 gives this error: Access to the registry key HKEY_LOCAL_MACHINESoftwareMyCompanyMyApp is denied.

如果我担任行政当局,就没有错误。

问题回答

贵方案的唯一出路是执行在有足够许可的账户下写给登记处的代码。 http://platinumdogs.wordpress.com/2008/10/30/net-c-impersonation-with-network-credentials/“rel=“nofollow noreferer”>article,其中举例说明了对用户的冒名。 有一些安全网站,以考虑到这一方法,IMHO的最佳方式是在方案安装期间开展这一行动。

这是温7联盟。 如果你想要获得登记处钥匙,那么你就不得不在节目需要管理特权或轻而易举地删除。 因此,你可以写

  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
        <requestedExecutionLevel  level="requireAdministrator" uiAccess="false" />        
      </requestedPrivileges>
    </security>
  </trustInfo>

for admin rights into the app.manifest in your properties folder or you write

  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
      </requestedPrivileges>
    </security>
  </trustInfo>

如果你不想使用行政权。





相关问题
Is CLSID in registry for windows operating system is constant

I am developing a windows mobile application where i need to get a registry value of notification settings ,that is stored with CLSID as a key .Can i depend on the CLSID for retrieving the value of a ...

登记许可问题

vs2008, c. First time myhons# , it needs to establish a LM LMSoftware. 湿租赁

Reading registry values with cmake

On a Windows 7 machine I cannot read any registry values that contain a semicolon. For example if you have 7-zip, running the following SET(MYPATH [HKEY_LOCAL_MACHINE\SOFTWARE\7-Zip;Path]) ...

How to check visible resolution of system

I am not entirely sure how to word this questions so I am just going to explain my problem. My VB 6 program saves the location of the screen in the registry so that when it loads up again it can have ...

How to read and write to registry using VB.NET

How do I read, write and delete a registry using VB 2005/2008? Please give your explanation to your answer. I am really a registry noob... Thanks. I can t read any programming language other than vb.

Installing a Windows Service as a user

I m currently in the process of creating a Windows service application which will monitor changes to certain keys made in the HKEY_USERS registry. The way I do this is by collecting the SID of the ...

热门标签