The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: azdps on May 29, 2009, 07:52:59 PM

Title: safely remove hardware icon
Post by: azdps on May 29, 2009, 07:52:59 PM
any idea's on how to prevent the safely remove hardware from showing. im sure i can just delete it from the tray after it shows but i would prefer to not have to go that route unless neccessary. what i would eventually like to do is prevent the icon from showing and have my own in its place.
Title: Re: safely remove hardware icon
Post by: jj2007 on May 29, 2009, 09:09:36 PM
Cool idea. Recently I caught a virus transmitted via the USB stick. Probably when I clicked the tray icon "safely remove hardware"...

So explain a little bit more how we can help you: You want to put your icon in place. And then?

:bg
Title: Re: safely remove hardware icon
Post by: azdps on May 29, 2009, 09:16:25 PM
im trying to make a free alternative to a program called usb safely remove (http://safelyremove.com/). basically takes the place of the windows safely remove icon and does the job much easier. i actually have it working fine except now i would like to have the windows safely remove hardware icon not shown at all so my program can handle it.

Here is my program. It will list usb disk devices attached to your computer if you left click on the tray icon. To safely shutdown one of the devices listed just left click on it.If you right click on the tray icon it will shutdown the program. Also an icon won't show in the tray if there are no usb disk drives attached to computer. if a usb disk device is plugged in, my program will then place and icon in the tray. so if dont have any and need to shut it down just do it in the task manager. works in windows xp and haven't tested it in win2k or vista. i have a feel it will have some issues in vista.

[attachment deleted by admin]
Title: Re: safely remove hardware icon
Post by: dedndave on May 29, 2009, 09:45:33 PM
To Enable hot-plug filter but hide safe-remove icon ( i386 platform ):
Add and set registry: "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\xfilt\Parameter0"
To DWORD value "0x80000000"

To Enable hot-plug filter but hide safe-remove icon ( x64 platform ):
Add and set registry: "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\xfiltx64\Parameter0"
To DWORD value "0x80000000"

http://www.tkarena.com/forums/ide-sata-raid-arena/39078-how-remove-safely-remove-hardware-icon.html

btw - can't believe they wanna charge for that - lol - software companies should always have a few freebies
Title: Re: safely remove hardware icon
Post by: jj2007 on May 29, 2009, 10:08:15 PM
Quote from: azdps on May 29, 2009, 09:16:25 PM
Here is my program.

It looks clean in Olly. But you aware of the misuse potential, aren't you?
:wink
Title: Re: safely remove hardware icon
Post by: dedndave on May 29, 2009, 10:14:16 PM
i don't have my thinking cap on today Jochen - help me out - lol
what misuse ?
Title: Re: safely remove hardware icon
Post by: jj2007 on May 29, 2009, 10:20:42 PM
Quote from: dedndave on May 29, 2009, 10:14:16 PM
i don't have my thinking cap on today Jochen - help me out - lol
what misuse ?

Well, the type of thing that happened to me: I caught a virus (conficker) transmitted via the USB stick. All you need is a virus running, and a fake icon "safely remove hardware". As it seems, azdps has only honest intentions, and there also other ways to infect the USB stick, but the potential is there...
Title: Re: safely remove hardware icon
Post by: dedndave on May 29, 2009, 10:25:56 PM
oh - i thought the OSs were somewhat prepared for the inevitable - pull it out before it's safe
Title: Re: safely remove hardware icon
Post by: azdps on May 29, 2009, 11:10:29 PM
jj2007 i'm familar with the virus you had since i had to manually remove it from my daughters computer. it was transfered via usb stick automatically from the computer to the usb stick without clicking on anything. was very an anoying problem. anyways my intentions are good and i explained it purpose above.

dedndave did you try your registry entry to see if it works? doesn't work for me. i didn't have the xfilt entry and had to manually enter it along with everything after that.
Title: Re: safely remove hardware icon
Post by: dedndave on May 29, 2009, 11:23:13 PM
did you re-boot after the change ?
Title: Re: safely remove hardware icon
Post by: zooba on May 30, 2009, 12:44:08 AM
Quote from: jj2007 on May 29, 2009, 09:09:36 PM
I caught a virus transmitted via the USB stick. Probably when I clicked the tray icon "safely remove hardware"...

I doubt it. The virus will have put an autorun.inf file on the USB. Disabling autorun for removable drives (except CD/DVD, unless you want it turned off for those too) is the best way to prevent the spread.

Cheers,

Zooba :U
Title: Re: safely remove hardware icon
Post by: PBrennick on May 30, 2009, 04:09:24 AM
So how did you get infeccted in the first place or is it a mystery? I sure like advance warnings so I can be careful.

Thanx,
P
Title: Re: safely remove hardware icon
Post by: dedndave on May 30, 2009, 04:14:14 AM
there is a KB for conficker, Paul - let me see if i can find it.....

KB958644
this d/l is for XP sp2/3

http://www.microsoft.com/downloads/details.aspx?familyid=0D5F9B6E-9265-44B9-A376-2067B73D6A03&displaylang=en

more info on it in MS08-67

http://www.microsoft.com/technet/security/Bulletin/MS08-067.mspx
Title: Re: safely remove hardware icon
Post by: azdps on May 30, 2009, 04:42:01 AM
dedndave attached is my exported registry entry. Can you look it over to make sure it looks right. I've rebooted but the icon still shows in the tray.


PBrennick the only reason I got infected was because I used a usb thumb drive that had portable antivirus software and connected it to a computer that had the virius. The virius immediately moved onto my thumb drive without me knowing about it. Not sure how my daughter orginally got it though. She said her system was running sluggish so I checked it out. I was stupid and didn't have an antivirus installed on her system. Anyways she downloads alot from friends and videos etc from the internet. I have the free edition of Avira Antivirus on all my systems now. Works great.

[attachment deleted by admin]
Title: Re: safely remove hardware icon
Post by: UtillMasm on May 30, 2009, 04:43:59 AM
 :lol
Title: Re: safely remove hardware icon
Post by: dedndave on May 30, 2009, 05:23:20 AM
your registry entry looks correct
you might try setting the value to 0
i see that reg entry all over the web

there is a way to right-click on the safely remove icon and tell it to always hide, but i am not sure that is a great idea
also, i was looking for a way to do it programatically - i think that's what you want
Title: Re: safely remove hardware icon
Post by: jj2007 on May 30, 2009, 05:59:01 AM
Re conficker: the story how I get infected is here (http://www.masm32.com/board/index.php?topic=11318.0).