开发者

Set IE Homepage with c# and disable changing it?

开发者 https://www.devze.com 2023-01-16 21:12 出处:网络
One of our customers requested us to develop an IE ToolBar which sets clients homepage to their company web site and track it via registry. We would like to track users homepage if it\'s still set to

One of our customers requested us to develop an IE ToolBar which sets clients homepage to their company web site and track it via registry. We would like to track users homepage if it's still set to company's web site.

Questions:

  1. I can set it via registry but we also want to disable for user to change it (disabling the ie homepage textbo开发者_开发百科x). How can we do it?

  2. Is there any way to track the home page dynamically like FileSystemWatcher?

Thanks!

To everyone who thinks we' re trying to do an illegal think: this is a 30 days campaign; do not think that we're doing an illegal thing. We will not do it automatically without users approval, user will install it manually after subscription, accepting the eula of the campaign and he/she will be istructed about what will happens if he/she installs the add-in.


Sounds very malware-like to me. Why would you impede users' freedoms? You're also implying that the user is even using IE or even Windows, which is foolish given that where it has a majority, IE is steadily losing market 'grip' to others such as Firefox and Chrome.


You can lock users from changing the homepage by setting a registry key:

HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Homepage

key type is DWORD and value is 1.

This will "grey out" the edit box in IE, but a knowledgeable user could still edit the homepage setting directly in Windows registry. Caveat: some antispyware tools raise a warning if this lock is engaged.

When you want to remove the lock, either set the value to 0 or remove the Homepage key in registry.

0

精彩评论

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