Jump to content

Recommended Posts

Posted (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.

#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 by WannaLearn
Posted

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
Posted

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. :idea:

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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

 

Posted

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
Posted

Hi George,

No one else to bug today? :idea:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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

 

Posted (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 :idea:

ps. after the 5th post, now I can edit my posts

thank you

Edited by WannaLearn
Posted

  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. :(

M23

P.S. And your English is fine. :)

Thnk you for the information :idea:

I hope it won't take too long :)

Posted

  On 4/24/2010 at 8:16 PM, 'Melba23 said:

Hi George,

No one else to bug today? :idea:

M23

Sure 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!"

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...