WannaLearn Posted April 24, 2010 Posted April 24, 2010 (edited) First of all, I know, and I'm sorry that there were similar questions relate to this topic. However, I wasn't able to solve the problem by myself. Also, English is not my first language, so please be generous(?) on some mistakes in communication. expandcollapse popup#NoTrayIcon #RequireAdmin ;~ #include <GUIConstantsEx.au3> Global Const $GUI_EVENT_CLOSE = -3 Opt("MustDeclareVars", 1) If @OSVersion = 'win_7' Then _W7IEicon() Else MsgBox(16,"Error","This program is for Window7 only",10) EndIf Func _W7IEicon() Local $sIE,$bGen,$bDel,$msg,$sReg,$sReg2 $sReg2 = '\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{871C5380-42A0-1069-A2EA-08002B30302D}' If @OSArch = "X64" Then $sIE = '"C:\Program Files (x86)\Internet Explorer\iexplore.exe"' $sReg = "HKCR64\CLSID\{871C5380-42A0-1069-A2EA-08002B30302D}" $sReg2 = 'HKLM64' & $sReg2 Else $sIE = '"C:\Program Files\Internet Explorer\iexplore.exe"' $sReg = "HKCR\CLSID\{871C5380-42A0-1069-A2EA-08002B30302D}" $sReg2 = 'HKLM' & $sReg2 EndIf GuiCreate("",130,75,@DesktopWidth / 2 - 103/2, @DesktopHeight / 2 - 75/2) $bGen = GUICtrlCreateButton("Make Icon",10,10,110) $bDel = GUICtrlCreateButton("Delete Icon",10,40,110) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $bGen RegDelete($sReg) RegWrite($sReg,'','REG_SZ','Internet Explorer') RegWrite($sReg,'InfoTip','REG_SZ','@C:\Windows\System32\ieframe.dll,-881') RegWrite($sReg2) Case $msg = $bDel RegDelete($sReg) RegDelete($sReg2) EndSelect WEnd EndFunc It generate IE icon without any problem. However, when I press "Delete Icon" button, the folder icon named "Internet Explorer" remains. I have looked up the registry and found out that HKCR\CLSID\{871C5380-42A0-1069-A2EA-08002B30302D} HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{871C5380-42A0-1069-A2EA-08002B30302D} were not deleted. I was able to delete those keys manually with the registry editor. When I delete the second key (HKML one), the icon on the desktop disappears successfully. I already tried followings: 1. turn off the anti-virus program 2. instead of using variables, tried both RegDelete('HKLM\... & RegDelete('HKLM64\... 3. turn off the UAO is there something that I'm missing?? Edited : simplified and removed most of "RegWrite()" lines to show more clearly. as posted below, the problem have solved by UPDATING to AUTOIT3.3.6.0 from autoit3.3.4.0 Edited April 25, 2010 by WannaLearn
WannaLearn Posted April 24, 2010 Author Posted April 24, 2010 Oh, I also have tried the following code... which showed me a popup box saying that errors = -2 Extended = 2 #RequireAdmin RegDelete("HKLM64\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{871C5380-42A0-1069-A2EA-08002B30302D}") $Err = @Error $Ext = @Extended Sleep(100) MsgBox(0,"errors","error= "&$Err&@CRLF&"Extended= "&$Ext)
WannaLearn Posted April 24, 2010 Author Posted April 24, 2010 Problem solved.... by updating to the latest version of autoit3.3.6.0 I was using 3.3.4.0 before... Bytheway, how to modify the title of prior post as solved??? It seems like I can not modify what I posted earlier.
Moderators Melba23 Posted April 24, 2010 Moderators Posted April 24, 2010 WannaLearn, You need a certain number of posts before some of the board functions become activated. However with a nickname like yours I cannot imagine that will take too long! Glad you solved your problem yourself - always more satisfying that way. M23 P.S. And your English is fine. Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Reveal hidden contents ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
GEOSoft Posted April 24, 2010 Posted April 24, 2010 Welcome to the forums and please be patient with M23, we haven't got him fully trained yet. Go to the original post, click "EDIT" and then click the "Use Full Editor" button. That should allow you to modify the thread title. George Reveal hidden contents Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
Moderators Melba23 Posted April 24, 2010 Moderators Posted April 24, 2010 Hi George, No one else to bug today? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Reveal hidden contents ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
WannaLearn Posted April 25, 2010 Author Posted April 25, 2010 (edited) On 4/24/2010 at 7:26 PM, 'GEOSoft said: Welcome to the forums and please be patient with M23, we haven't got him fully trained yet.Go to the original post, click "EDIT" and then click the "Use Full Editor" button. That should allow you to modify the thread title.It seems like I don't have a enough authority for edit yet... since I can't find a "EDIT" button.Thank you anyway ps. after the 5th post, now I can edit my poststhank you Edited April 25, 2010 by WannaLearn
WannaLearn Posted April 25, 2010 Author Posted April 25, 2010 On 4/24/2010 at 4:23 PM, 'Melba23 said: WannaLearn,You need a certain number of posts before some of the board functions become activated. However with a nickname like yours I cannot imagine that will take too long! Glad you solved your problem yourself - always more satisfying that way. M23P.S. And your English is fine. Thnk you for the information I hope it won't take too long
GEOSoft Posted April 25, 2010 Posted April 25, 2010 On 4/24/2010 at 8:16 PM, 'Melba23 said: Hi George,No one else to bug today? M23Sure I have, but your name came out of the hat. I can picture Jos wiping his brow in relief because on a day like this it's usually his name that comes popping out. George Reveal hidden contents Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
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