开发者

Registry Write Privileges on Windows 7 with Delphi 7

I was built an application on D开发者_开发问答elphi 7 + Windows XP Pro Sp3 platform, the application run correctly, than i sent this application to my friend that have a Windows 7 OS, my application cannot write the initialization data to the registry with an error "Failed to set data ...", i was suggesst my friend to right clik and choose "Run as Administrator...". How can i build my application on Delphi 7 that can run and write a registry on Windows 7?

Please help, because i could not find the right solution on google right now...

Thanks in advance...

Regards Chrisna Obaja


Modern versions of Windows have their users running without admin rights by default. This is controlled by UAC.

The solution is usually not to attempt to gain admin rights. Instead you should stop attempting things that need admin rights unless you really do need to. Typically only install programs need admin rights.

You don't say why you are writing to a restricted area of the registry but you should be able to find an alternative to doing so.


You can only write without restriction in HKEY_CURRENT_USER section only - and that will almost be suficient.

To write other parts of registry make an installer.

Otherwise you need Administrator Rights or manifest file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜