BigDaddyO Posted July 9, 2010 Posted July 9, 2010 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
LarryDalooza Posted July 9, 2010 Posted July 9, 2010 (edited) 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 July 9, 2010 by LarryDalooza AutoIt has helped make me wealthy
BigDaddyO Posted July 9, 2010 Author Posted July 9, 2010 (edited) try Run()ning this...RUNDLL32.EXE user32.dll,UpdatePerUserSystemParametersLar.ps... OR...http://www.autoitscript.com/forum/index.php?showtopic=108929&view=findpost&p=767100I 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 July 9, 2010 by MikeOsdx
Spiff59 Posted July 9, 2010 Posted July 9, 2010 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?
BigDaddyO Posted July 9, 2010 Author Posted July 9, 2010 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now