Disable Windows Picture and Fax Viewer via addon pack?

Discuss & post Update Pack addons here.
Post Reply
User avatar
Mrs Peel
The Dominatrix Recoded
Posts: 1344
Joined: Tue Jan 17, 2006 2:02 am
Location: Aotearoa
Contact:

Disable Windows Picture and Fax Viewer via addon pack?

Post by Mrs Peel » Mon Jan 23, 2006 9:34 pm

It's been mighty impressive to discover that addon packs can be used to do more than just install software and update packs, so it's got me wondering if there is any kind of addon pack which could be used to nuke my second most hated Windows component (WMP is naturally my first most hated one LOL)....

The default Windows Picture and Fax Viewer!!!!! (booooooo hisssssss kill kill!)

Currently the way I disable this thing on a fresh installation is to run a bat file I made which deregisters the DLL file for it:

Code: Select all

regsvr32 /u shimgvw.dll
And then I have to manually attack the registry and remove the entry:

Code: Select all

HKEY_CLASSES_ROOT\SystemFileAssociations\image\ShellEx\ContextMenuHandlers ShellImagePreview
I've been told it's not wise to nuke shimgvw.dll during an nLite build cos it creates issues. So my next best option would be an addon pack that that deregs the DLL and then automatically removes that reg entry.

Is this kind of thing possible to do? Please say "yes" or I'll cry :cry:

User avatar
dgelwin
Posts: 1152
Joined: Wed Aug 10, 2005 1:33 am
Location: Tegucigalpa, Honduras

Post by dgelwin » Mon Jan 23, 2006 9:36 pm

yes its possible, so go ahead give it a try :D
Don't sweat petty things....or pet sweaty things

User avatar
Mrs Peel
The Dominatrix Recoded
Posts: 1344
Joined: Tue Jan 17, 2006 2:02 am
Location: Aotearoa
Contact:

Post by Mrs Peel » Mon Jan 23, 2006 9:42 pm

Smartarse! :P

Not photoshopping any more fantasy computer chicks for you now (((sulk)))

User avatar
dgelwin
Posts: 1152
Joined: Wed Aug 10, 2005 1:33 am
Location: Tegucigalpa, Honduras

Post by dgelwin » Mon Jan 23, 2006 9:44 pm

crap i posted in the wrong thread here read this http://www.ryanvm.net/forum/viewtopic.php?p=15554#15554
Don't sweat petty things....or pet sweaty things

User avatar
Kelsenellenelvian
Moderator
Posts: 4383
Joined: Tue Nov 30, 2004 8:32 pm
Location: Pocatello, ID
Contact:

Post by Kelsenellenelvian » Sun Jan 29, 2006 12:00 am

ANy one figured this out yet?

User avatar
DisabledTrucker
Posts: 822
Joined: Tue Feb 22, 2005 6:14 pm
Location: Country of Mental on the Planet Trucker in the MidnightHunter Galaxy.
Contact:

Post by DisabledTrucker » Sun Jan 29, 2006 12:01 pm

removing the registry entry should be easy since all you have to do is write code similar to this:

Code: Select all

-HKEY_CLASSES_ROOT\SystemFileAssociations\image\ShellEx\ContextMenuHandlers ShellImagePreview
but I'm not sure about the regsvr32 part of it.
Matthew 22:36-40

I have some gmail invites left, if you'd like one IM me and let me know.

[url=mms://wmc1.liquidviewer.net/WNOR]WNOR FM-99[/url] The best station in the world!

User avatar
Mrs Peel
The Dominatrix Recoded
Posts: 1344
Joined: Tue Jan 17, 2006 2:02 am
Location: Aotearoa
Contact:

Post by Mrs Peel » Sun Jan 29, 2006 5:18 pm

DisabledTrucker wrote:removing the registry entry should be easy since all you have to do is write code similar to this:

Code: Select all

-HKEY_CLASSES_ROOT\SystemFileAssociations\image\ShellEx\ContextMenuHandlers ShellImagePreview
but I'm not sure about the regsvr32 part of it.
Thanks Trucker. I was just wondering if there was some way I could integrate that reg file to remove that entry and a cmd file to deregister the dll into a standard addon pack.

I could probably make those two files into a switchless installer that copies them to temp folder and executes them, but I am sure there must be a cleaner way to do it than that?

C'mon all you lurking RVM gurus, surely you must have some clever ideas for how to make this tweak into a proper addon pack?

:?

User avatar
5eraph
Site Admin
Posts: 4621
Joined: Tue Jul 05, 2005 9:38 pm
Location: Riverview, MI USA

Post by 5eraph » Sun Jan 29, 2006 5:30 pm

Why not just create an INF to do what you want?

Code: Select all

;Disable Windows Picture and Fax Viewer in Win9x, Me, NT, 2k, XP, 2k3
[Version]
Signature="$CHICAGO$"

[DefaultInstall]
DelReg         =Viewer.DelReg
UnRegisterDlls =Viewer.UnRegister

[Viewer.DelReg]
HKCR,"SystemFileAssociations\image\ShellEx\ContextMenuHandlers\ShellImagePreview"

[Viewer.UnRegister]
11,,shimgvw.dll,1
I got the idea to do this by looking into wmp10.inf. :) I haven't tested it though and it might be missing something.

EDIT:

Completely rewrote the code.
Last edited by 5eraph on Sun Jan 29, 2006 11:52 pm, edited 9 times in total.

User avatar
Mrs Peel
The Dominatrix Recoded
Posts: 1344
Joined: Tue Jan 17, 2006 2:02 am
Location: Aotearoa
Contact:

Post by Mrs Peel » Sun Jan 29, 2006 5:47 pm

5eraph, now we're talking! LOL

I'm still very much an inf-novice so I couldn't stretch my brain to such a possibility (quite yet hehe). I am assuming I could just make this into an addon pack by making an entries_ file to accompany it, yes?

One quick question tho? In your code where it says [Viewer.Uninstall] ... I've been told it may cause stability issues to remove that dll, so I just want to check that what this part of the code does is simply to unregister the dll only? It's not going to remove it is it?

Cheers and thanks for the speedy reply :)

User avatar
5eraph
Site Admin
Posts: 4621
Joined: Tue Jul 05, 2005 9:38 pm
Location: Riverview, MI USA

Post by 5eraph » Sun Jan 29, 2006 5:55 pm

I'm still a novice myself. I typically edit existing INFs to make things work. I know even less about making Addons, but I don't see why you couldn't make an Addon from it. :)

The DLL should still exist in the Windows installation, but to my knowledge the functionality it contains will be disabled. I don't know what else it does so I can't say what kind of side-effects you'll have by deregistering it...
Last edited by 5eraph on Sun Jan 29, 2006 6:06 pm, edited 1 time in total.

User avatar
Mrs Peel
The Dominatrix Recoded
Posts: 1344
Joined: Tue Jan 17, 2006 2:02 am
Location: Aotearoa
Contact:

Post by Mrs Peel » Sun Jan 29, 2006 6:04 pm

As far as I know all that dll does is add "Windows Picture and Fax Viewer" to the default app in your "Open With" list. If you only remove the registry key images will not open with it by default anymore, but deregging the dll as well means it cannot try to hijack your image file associations anymore - say in the case where you uninstalled IrfanView and didn't want those associations to revert back to Windows Picture and Fax Viewer.

OK I have another problem now LOL cos I already removed that ContextMenuHandlers reg key I no longer have a copy in my system which I can export to a reg file. :oops:

Can somebody who has Windows Picture and Fax Viewer enabled please check their reg for that key and copy me the exact code for it please?

Cheers m'dears :)

User avatar
5eraph
Site Admin
Posts: 4621
Joined: Tue Jul 05, 2005 9:38 pm
Location: Riverview, MI USA

Post by 5eraph » Sun Jan 29, 2006 6:32 pm

Here's an exported key for you:

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\SystemFileAssociations\image\ShellEx\ContextMenuHandlers\ShellImagePreview]
@="{e84fda7c-1d6a-45f6-b725-cb260c236066}"

User avatar
5eraph
Site Admin
Posts: 4621
Joined: Tue Jul 05, 2005 9:38 pm
Location: Riverview, MI USA

Post by 5eraph » Sun Jan 29, 2006 7:50 pm

I tried something new with the INF code and guessed that if there is a RegisterDlls entry then an UnRegisterDlls entry must also be valid. The revised code is posted above.

It now works when installed from within Windows, but I can't remove the Open With reference in the right-click menu yet. Are you sure that's the only RegKey? Or maybe it's the only one present when doing a fresh install of Windows.:?:

User avatar
Mrs Peel
The Dominatrix Recoded
Posts: 1344
Joined: Tue Jan 17, 2006 2:02 am
Location: Aotearoa
Contact:

Post by Mrs Peel » Sun Jan 29, 2006 8:45 pm

OK I enlisted some help from Kel who is testing out Win2k3 (sorry I forgot to mention I am using this OS) and here's the code which he's confirmed works:

Code: Select all

;Disable Windows Picture and Fax Viewer in Windows 2003.

[Version]
Signature="$Windows NT$"

[Optional Components]
DisableViewer

[DisableViewer]
DelReg               = Viewer.DelReg
RunPostSetupCommands = Viewer.Uninstall

[Viewer.DelReg]
HKCR,"SystemFileAssociations\image\ShellEx\ContextMenuHandlers\ShellImagePreview"

[Viewer.Uninstall]
"%11%\regsvr32.exe /u %11%\shimgvw.dll"
Not sure if I need to make a different version for both XP and Win2k3.

As a matter of interest I noticed in the latest nLite RC6 release notes there is some more control over that pesky pics and fax viewer. Hopefully Nuhi has added a new tweak in there to disable it during ISO build and this INF method will become obsolete. I'll be taking a look at that later today.

Cheers m'dears and thanks for the tech support :)

User avatar
Mrs Peel
The Dominatrix Recoded
Posts: 1344
Joined: Tue Jan 17, 2006 2:02 am
Location: Aotearoa
Contact:

Post by Mrs Peel » Sun Jan 29, 2006 8:52 pm

PS: Oh DUH I just took a look at your revised code. That looks like it will work OK too. OK I'll have a play with that later too. It's a good opportunity to accelerate my inf-file learning curve LOL :D

User avatar
5eraph
Site Admin
Posts: 4621
Joined: Tue Jul 05, 2005 9:38 pm
Location: Riverview, MI USA

Post by 5eraph » Sun Jan 29, 2006 11:31 pm

I made a final revision to slim down the code even further. All that exists now is what's absolutely necessary to make the required changes.
Mrs Peel wrote:It's a good opportunity to accelerate my inf-file learning curve LOL :D
Same. Most of my experience with INFs is from rewriting poorly written unsigned BenQ monitor drivers.:)

User avatar
DisabledTrucker
Posts: 822
Joined: Tue Feb 22, 2005 6:14 pm
Location: Country of Mental on the Planet Trucker in the MidnightHunter Galaxy.
Contact:

Post by DisabledTrucker » Sun Jan 29, 2006 11:51 pm

As far as building a pack for this inf, take a look at my pack for the inf version of cmdhere for a way to do it, not sure if that works yet or not though, but the inf does, I haven't attempted a build yet with that addon on it yet, I have it built, just not tested yet... I haven't heard any complaints on it though so it must be working either that or noone's using it...

Glad I have a Samsung SyncMaster, I don't have to worry about unsigned drivers in fact the ones from M$ are even newer than Samsung's for it! :)
Matthew 22:36-40

I have some gmail invites left, if you'd like one IM me and let me know.

[url=mms://wmc1.liquidviewer.net/WNOR]WNOR FM-99[/url] The best station in the world!

Post Reply