Jump to content
Sign in to follow this  
BigDaddyO

Refresh Desktop problem "sort of"

Recommended Posts

BigDaddyO

I am writing up a script to redirect all of a users browser shortcuts through the MSDN app DropMyRights in an attempt to better protect the systems.

Part of this script is to remove the IE Icon from the desktop. this is accomplished by setting this registry key.

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Explorer", "NoInternetIcon", "REG_DWORD", 1)

I then create a new IE shortcut on the desktop which is redirected through DropMyRights.

The issue, is that the IE Icon does not go away until a log off and log on. I tried the EnvUpdate() and that didn't work. Doing an F5 also doesn't work.

Does anyone have an idea on how I can get that IE Icon to go away without have to have the user reboot?

Thanks,

Mike


Share this post


Link to post
Share on other sites
LarryDalooza

try Run()ning this...

RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters

Lar.

ps... OR...

http://www.autoitscript.com/forum/index.php?showtopic=108929&view=findpost&p=767100

Edited by LarryDalooza

f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Share this post


Link to post
Share on other sites
BigDaddyO

try Run()ning this...

RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters

Lar.

ps... OR...

http://www.autoitscript.com/forum/index.php?showtopic=108929&view=findpost&p=767100

I tried the RunDLL32 and the _Update_Explorer() function from that link and neither of them worked. Googling that User32.dll I found a link about policy update, so I tried gpupdate.exe /force but that didn't work either.

I also found a note saying HKLM policies do not update until logon, so I changed to the HKCU which only effects the logged on user and I still can't get it to refresh and remove the icon from the desktop without the logoff.

hmm...

EDIT: I found that ending task on Explorer.exe and then relaunching as a new task got it to remove the IE icon. Would it be a bad thing to do this in the script?

Edited by MikeOsdx

Share this post


Link to post
Share on other sites
Spiff59

Am guessing sending an F5 (refresh desktop) doesn't do the trick?

RegWrite ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu", "{871C5380-42A0-1069-A2EA-08002B30309D}", "REG_DWORD", 1)
RegWrite ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel", "{871C5380-42A0-1069-A2EA-08002B30309D}", "REG_DWORD", 1)

How about after these registry mods?

Share this post


Link to post
Share on other sites
BigDaddyO

Am guessing sending an F5 (refresh desktop) doesn't do the trick?

RegWrite ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu", "{871C5380-42A0-1069-A2EA-08002B30309D}", "REG_DWORD", 1)
RegWrite ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel", "{871C5380-42A0-1069-A2EA-08002B30309D}", "REG_DWORD", 1)

How about after these registry mods?

Excellent, using those two registry keys along with the _Update_Explorer() function in the other post got it to update instantly.

Thank you Larry and Spiff59


Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.