Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

Lotsa goodies - shell extensions, oem installer, toolbar removal

- - - - -

  • Please log in to reply
4 replies to this topic

#1
Plamdi

Plamdi

    Junior

  • Member
  • Pip
  • 82 posts
  • Joined 22-March 06
Feel free to pin this topic! Cause everyone gunna want SOMETHING in it! :thumbup

Please Note: The line breaks appear to be in Unix mode, which means they do not correctly render when pasted into Notepad. For this reason I've replaced all references to Notepad with Wordpad, please paste into to Wordpad not Notepad to save as it does handle Unix line breaks correctly!

Okay, some of you have probably forgotten I've ever contributed my own little VBS files, so here they are... all shell extensions can be installed silently with either /S or /SILENT (case-insensitive), and all can be uninstalled through "Add/Remove Programs" (or by simply running the VBS file). Also every shell-extension file copies itself to its installation destination, which is usually in SYSTEM32. All are designed for Windows NT (2000, XP, etc) - I don't know if they'll work with Win9x.

Here's a list of all my programs in this post, with a quick explination of what it does:
  • Run with arguments - allows one to right-click a file and select "run with arguments" to run the file using command-line arguments.
  • Image conversion shell extension - allows one to right-click image files and convert to another format.
  • Directory usage - allows one to right-click a directory (folder) and click "show directory usage", which is then displayed in Wordpad.
  • Quick find - a cheap and nasty search feature added to the context-menu on folders.
  • OEM Installer - installs programs without user interaction. Intended for use with unattended Windows setups.
  • Remove toolbars - silently, and automatically removes Google and Yahoo toolbars. Intended for use with unattended setups.
  • Set archives - this replaces some file-types with different icons.
There are more in the next post!

1. Run With Arguments.

This VBS file adds to your context menu "Run With Argument", and it does exactly what it says. Paste into Wordpad, save as RUNWARGS.VBS.
' © 2006 plamdi.com, this file must not be sold, you may distribute it' freely so long as it remains unmodified with all internal documentation.'' This program allows you to run any program with arguments, simply' right click and select "Run With Arguments" once installed. It is' uninstallable from Add or Remove Programs - or by running the' file directly.'' Installation:' 1. Double click on i_conv.vbs to install/uninstall' 2. Run "WScript.exe i_conv.vbs" from a command prompt or the run dialogue.' 3. Run "WScript.exe i_conv.vbs /s" to achieve a silent installation.Option Explicit:On Error Resume NextDim WshShell,fso,a,f,i,o,p,q(10),t,u,v,w:w=0Set WshShell=WScript.CreateObject("WScript.Shell")Set fso=CreateObject("Scripting.FileSystemObject")p=UCase(WshShell.Environment("PROCESS")("SystemRoot"))&"\SYSTEM32\"If UCase(WScript.ScriptFullName)<>p&"RUNWARGS.VBS" Then fso.CopyFile WScript.ScriptFullName,p&"runwargs.vbs"If Wscript.Arguments.Count=1 ThenIf Wscript.Arguments(0)="/REM" Thenv=MsgBox("Are you sure you want to remove the Run With Arguments shell extensions?",292,"Remove shell extensions confirmation")If v=7 Then WshShell=Nothing:Wscript.Quit(1)w=7ElseIf UCase(Wscript.Arguments(0))="/S" Or UCase(Wscript.Arguments(0))="/SILENT" Thenw=6ElseErrHndlr()End IfElseIf Wscript.Arguments.Count=2 ThenIf Wscript.Arguments(0)="/RUN" Thenw=InputBox(Wscript.Arguments(1)&"."&vbCrLf&vbCrLf&"Enter command line arguments below.","Run With Arguments")WshShell.Run(Wscript.Arguments(1)&" "&w)Set WshShell=NothingWscript.Quit(1)ElseErrHndlr()End IfEnd Ifq(0)="com":q(1)="exe":q(2)="bat":q(3)="cmd":q(4)="lnk":q(5)="vbs":q(6)="vbe":q(7)="js":q(8)="jse":q(9)="wsf":q(10)="wsh"If w=0 Then w=MsgBox("Do you want the Run With Arguments shell extensions?",292,"Enable/Disable shell extensions")For i=0 To UBound(q)a=WshShell.RegRead("HKCR\."&q(i)&"\")If a<>"" Thent="HKCR\"&a&"\shell\"&"Run_With_Args\"If w=6 ThenWshShell.RegWrite t,"Run With Arguments"WshShell.RegWrite t&"command\","WScript.exe """&p&"runwargs.vbs"" /RUN ""%d"""ElseWshShell.RegDelete t&"command\":WshShell.RegDelete tEnd Ift="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\runwargs\"If w=6 ThenWshShell.RegWrite t,""WshShell.RegWrite t&"DisplayName","Run With Arguments Shell Extensions (Removal)"WshShell.RegWrite t&"UninstallString","WScript.exe """&p&"runwargs.vbs"" /REM"WshShell.RegWrite t&"NoModify",1,"REG_DWORD"WshShell.RegWrite t&"NoRepair",1,"REG_DWORD"ElseWshShell.RegDelete t&"NoModify":WshShell.RegDelete t&"NoRepair"WshShell.RegDelete t&"UninstallString":WshShell.RegDelete t&"DisplayName":WshShell.RegDelete tfso.DeleteFile(p&"runwargs.vbs")End IfEnd IfNext'iSet WshShell=NothingWscript.Quit(1)sub ErrHndlr()MsgBox "Invalid parameters were given. The only correct user command line is /s or /silent.",16,"runwargs.vbs error"Set WshShell=NothingWscript.Quit(0)End Sub

2. Image Conversion Shell Extension.

This is even better then the above shell extension, because it allows you to convert image files between common formats right from the context menu. This extension requires IrfanView to be installed. Paste into Wordpad, save as I_CONV.VBS.

3. Directory Usage.

This VBS file adds to your context menu "Show Directory Usage", and does exactly that when clicked. It requires Du from Sysinternals. Paste into Wordpad, save as DIRINFO.VBS.
' © 2006 plamdi.com, this file must not be sold, you may distribute it' freely so long as it remains unmodified with all internal documentation.' Use this file with Du from Sysinternals. Copy Du.exe to %WINDIR%\SYSTEM32,' and then run this file to install the shell extension. You may now right click any' directory (folder) to view it's disk usage.Option Explicit:On Error Resume NextDim WshShell,fso,f,o,p,t,v,w,tmp:w=0Set WshShell=WScript.CreateObject("WScript.Shell")Set fso=CreateObject("Scripting.FileSystemObject")p=Left(WScript.ScriptFullName,Len(WScript.ScriptFullName)-Len(WScript.ScriptName))If Wscript.Arguments.Count=1 ThenIf Wscript.Arguments(0)="/REM" Thenv=MsgBox("Are you sure you want to remove the directory-information shell extension?",292,"Remove shell extension confirmation")If v=7 Then WshShell=Nothing:Wscript.Quit(1)w=7ElseIf UCase(Wscript.Arguments(0))="/S" Or UCase(Wscript.Arguments(0))="/SILENT" Thenw=6Elsetmp=fso.GetSpecialFolder(2)&"\"&fso.GetTempNameWshShell.Run("cmd /c du -q """&Wscript.Arguments(0)&""">"""&tmp&""""),0,TrueSet f=fso.OpenTextFile(tmp,1)o="Directory Information For:"&vbCrLf&Wscript.Arguments(0)&vbCrLf&vbCrLf&f.ReadAllf.Closefso.DeleteFile(tmp)Set f=fso.CreateTextFile(tmp, True):f.Write o:f.CloseWshShell.Run("Wordpad """&tmp&""""),1,Truefso.DeleteFile(tmp)Set WshShell=NothingWscript.Quit(1)End IfElseIf Wscript.Arguments.Count<>0 ThenErrHndlr()End IfIf fso.fileexists(p&"du.exe") ThenIf UCase(WScript.ScriptFullName)<>UCase(p&"DIRINFO.VBS") Thenfso.CopyFile WScript.ScriptFullName,p&"dirinfo.vbs"End IfElseIf fso.fileexists(WshShell.Environment("PROCESS")("SystemRoot")&"\System32\du.exe") Thenp=WshShell.Environment("PROCESS")("SystemRoot")&"\System32\"fso.CopyFile WScript.ScriptFullName,p&"dirinfo.vbs"ElseIf w=6 ThenWshShell=Nothing:Wscript.Quit(0)ElseIf w<>7 Thenv=MsgBox("Du not found. Would you like to remove the shell extension?",292,"Remove shell extension")If v=7 Then WshShell=Nothing:Wscript.Quit(1)End IfEnd IfEnd IfIf w=0 Then w=MsgBox("Do you want the directory-information shell extension?",292,"Enable/Disable shell extension")t="HKCR\Folder\shell\show_dir_usage\"If w=6 ThenWshShell.RegWrite t,"Show Directory Usage"WshShell.RegWrite t&"command\","WScript.exe """&p&"dirinfo.vbs"" ""%d"""ElseWshShell.RegDelete t&"command\":WshShell.RegDelete tEnd Ift="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\dirinfo\"If w=6 ThenWshShell.RegWrite t,""WshShell.RegWrite t&"DisplayName","Directory Information Shell Extension (Removal)"WshShell.RegWrite t&"UninstallString","WScript.exe """&p&"dirinfo.vbs"" /REM"WshShell.RegWrite t&"NoModify",1,"REG_DWORD"WshShell.RegWrite t&"NoRepair",1,"REG_DWORD"ElseWshShell.RegDelete t&"NoModify":WshShell.RegDelete t&"NoRepair"WshShell.RegDelete t&"UninstallString":WshShell.RegDelete t&"DisplayName":WshShell.RegDelete tfso.DeleteFile(p&"dirinfo.vbs")End IfSet WshShell=NothingWscript.Quit(1)sub ErrHndlr()MsgBox "Invalid parameters were given. The only correct user command line is /s or /silent.",16,"dirinfo.vbs error"Set WshShell=NothingWscript.Quit(0)End Sub

4. Quick Find.

Adds a cheap-and-nasty search feature to all folders, so you can right click and select "Quick Find" - this will search just that directory, and it's subdirectories. Paste into Wordpad, save as QFIND.VBS.

5. OEM Installer.

This is probably one the greatest of all my VBS creations. It isn't a shell-extension, it is a program for automated installations where the program doesn't support silent switches - or, displays dialogues, etc, when using said switches. It works very well, and all documentation required to use it is in the two files required. This requires two files, OEMINST.VBS, and OEMINST.INI, so paste the following code into Wordpad, and save as OEMINST.VBS and OEMINST.INI, respectively. There are some working examples in the .INI file.

OEMINST.VBS:
OEMINST.INI:
OEM Installer configuration file.This file may be compressed using makecab. Type "makecab oeminst.ini" withoutquotations at the command prompt and then delete oeminst.ini to do this.Bear in mid you'll have to decompress it with Expand to edit it. Don't renameoeminst.in_, it must be named with the extension .in_ in order to work.Please note that microsoft's "EXPAND.EXE" must be accessible through the path(not to worry though, it's in WINDOWS\SYSTEM32 unless you delete it).OEMINST.INI must be named according to oeminst.vbs. This allows youflexibility if you want to rename the file. For instance if you renameoeminst.vbs to oem_installer.vbs then the ini file must be namedoem_installer.ini - or oem_installer.in_ if it's compressed with makecab.See OEMINST.VBS for more information about this program!This file allows for oem installer to automate any installation defined inthis file. The command-line syntax for OEM Installer is:WSCRIPT OEMINST.VBS PROGRAMNAMEExample:wscript oeminst.vbs winampThis will run the automated installation for Winamp shown below. This isconfigured for Winamp 2.95.Configuration syntax is as follows:Every program should fall under a unique program name, where the programname is enclosed in square brackets - [PROGRAMNAME].Under this line you may define the following properties:Program (REQUIRED) - this is the path to the installation file to be run.Switches (OPTIONAL) - command line switches for the installation file.ProcessCheck (OPTIONAL) - instructs OEM Installer to check for process(es).OperationTitle (REQUIRED) - used with OperationKeys, sets an operation.OperationKeys (REQUIRED) - Sets an operation as explained above.Program -You must specify a complete path, or a path relative to OEM Installer.Paths relative to the installer should use "@\" to show the path starts "at"OEM Installer's directory.Examples that are acceptable:Program=C:\Installation Files\Winamp 2.95\Winamp295.exe[url="http://"]Program=@\Winamp295.exe[/url][url="http://"]Program=@\Winamp[/url] 2.95\Winamp295.exeExamples that are unacceptable:Program=%SystemDrive%\Winamp 2.95\Winamp295.exeProgram="C:\Installation Files\Winamp 2.95\Winamp295.exe"Environment Variables CANNOT BE USED, and do not encase in quotations!Switches -In many cases you will want to pass command-line switches to the installer.You may specify as many as you like, using normal syntax. Don't enclosein quotations (unless it's part of the one switch).Examples that are acceptable:Switches=/silentSwitches=/silent /installpath="%ProgramFiles%\Program Name"ProcessCheck -Although this is optional, adding this makes OEM Installer fool-proof andfail-safe! When processcheck is used OEM Installer will check to ensure thatat least one of the named processes is running, and if they aren't then itwill Terminate (after a short "grace period"). What this means is that if theinstallation was abnormally terminated, OEM Installer will stop waiting toprocess the next dialogue box and terminate. You can specify as manyprocesses as are necessary, just be sure to include ALL processes that willrun, including the original installer you launch - if appropriate the "subinstaller" that is launched from the main installer, and if appropriate theprogram name if the program itself is launched at the end of installation.You may add numbers to the end, or just specify multiple ProcessCheck=entries un-numbered, whichever you prefer.Examples that are acceptable:ProcessCheck=INSTALLFILE.EXEProcessCheck=INSTALLFILE.EXEProcessCheck=INSTALLFILE2.EXEProcessCheck=LAUNCHEDFILE.EXEProcessCheck01=INSTALLFILE.EXEProcessCheck02=INSTALLFILE2.EXEProcessCheck03=LAUNCHEDFILE.EXEExamples that are unacceptable:ProcessCheck=INSTALLFILE.EXE, INSTALLFILE2.EXE, LAUNCHEDFILE.EXEProcessCheck="INSTALLFILE.EXE"Each entry must be on a seperate line! Again, no quotations!OperationTitle, OperationKeys -This is the heart of the automation. OperationTitle generally means thetitle of the dialogue-box that is displayed on screen. For instance, whenyou open Notepad (without opening a file) the title is "Untitled - Notepad".OperationKeys generally means the keystrokes to send to the dialogue-box.These can be any keys on the keyboard, and use this format:Backspace - {BS}, {BREAK}, {CAPSLOCK}, {DEL}, {END}, {ENTER} or ~, {ESC},{HELP}, {HOME}, {INSERT} or {INS}, {NUMLOCK}, Page Down - {PGDN}, Page Up- {PGUP}, Print Screen - {PRTSC}, {SCROLLLOCK}, {TAB}, Down Arrow - {DOWN}Left Arrow - {LEFT}, Right Arrow - {RIGHT}, Up Arrow - {UP}, {F1}, {F2},{F3}, {F4}, {F5}, {F6}, {F7}, {F8}, {F9}, {F10}, {F11}, {F12}, {F13},{F14}, {F15}, {F16}, {+}, {^}, {~}, {%}, {(}, {)}, {[}, {]}, {{}, {}},Alt - %, Ctrl - ^, Shift Lock - +.All other keys can be specified as is. Use parentheses "()" if you want tocreate combination key-presses. Example: "%(~)"Again, don't encase in quotations. You may specify as many OperationTitle'sand OperationKeys' as you need, they will be run in chronological orderand you MUST have as many OperationTitle's as OperationKeys'. You cannumber them, but it isn't required.Examples that are acceptable:OperationTitle=Winamp Setup: SettingsOperationKeys={TAB}{TAB}N{TAB} {UP} {UP}{UP}{UP} ~OperationTitle=Winamp Setup: Winamp successfully installedOperationKeys=%{F4}OperationTitle01=Winamp Setup: SettingsOperationTitle02=Winamp Setup: Winamp successfully installedOperationKeys01={TAB}{TAB}N{TAB} {UP} {UP}{UP}{UP} ~OperationKeys02=%{F4}There is a special case. If instead of sending keystrokes you would liketo immediately terminate a process use this syntax:OperationTitle=PROGRAMNAME.EXEOperationKeys=[!]By specifying "[!]" OEM Installer will understand you want to kill a processinstead of sending keystrokes. You must specify the executable's name(including extension, but not including path) in this instance, rather thena dialogue-box title.Example:If at the end of installation program documentation is opened in Notepad,then you could use this line:OperationTitle01=NOTEPAD.EXEOperationKeys02=[!]Please note this would terminate ALL instances of Notepad indiscriminately.Two important points to remember:1. Do not use quotations around any expressions.2. Do not use "white space" on the right-hand side of expressions.   However, you can use as much as you like on the left-hand side.Examples on point "2":OperationKeys01  ={TAB}{TAB}N{TAB} {UP} {UP}{UP}{UP} ~OEM installer will press:<TAB><TAB><LETTER-N><TAB><SPACE><UP><SPACE><UP><UP><UP><SPACE><ENTER>OperationKeys01  = {TAB}{TAB}N{TAB} {UP} {UP}{UP}{UP} ~OEM Installer will press:<SPACE!><TAB><TAB><LETTER-N><TAB><SPACE><UP><SPACE><UP><UP><UP><SPACE><ENTER>ProcessCheck02   =WINAMP.EXEOEM Installer will check for a process called "winamp.exe"ProcessCheck02   = WINAMP.EXEOEM Installer will check for a process called " winamp.exe"!Place installation syntax below this line, not above.-----------------------------------------------------------------------------[Winamp]Program          [url="http://"]=@\WINA295.EXE[/url]Switches         =/SProcessCheck01   =WINA295.EXEProcessCheck02   =WINAMP.EXEOperationTitle01 =Winamp Setup: SettingsOperationKeys01  ={TAB}{TAB}N{TAB}{UP} {UP} {UP}{UP} ~OperationTitle02 =Winamp Setup: Winamp successfully installedOperationKeys02  =%{F4}[DVD43]Program          [url="http://"]=@\DVD43.EXE[/url]Switches         =/SILENTProcessCheck     =DVD43.EXEOperationTitle   =ConfirmOperationKeys    =N[Monkey's Audio]Program          [url="http://"]=@\MACSETUP.EXE[/url]Switches         =/SILENTProcessCheck01   =MACSETUP.EXEProcessCheck02   =Monkey's Audio.exeProcessCheck03   =Winamp Plugin.exeOperationTitle01 =Monkey's Audio Winamp PluginOperationKeys01  =~OperationTitle02 =Monkey's Audio 4.01OperationKeys02  =%{F4}[Unlocker]Program          [url="http://"]=@\UNLOCKER.EXE[/url]Switches         =/SProcessCheck01   =UNLOCKER.EXEProcessCheck02   =UnlockerAssistant.exeOperationTitle   =UnlockerAssistant.exeOperationKeys    =[!]

6. Remove Toolbars.

This file silently uninstalls both the Google and Yahoo toolbars, if present.

REMTOOLB.VBS
' © 2006 Plamdi.com. This file silently uninstalls the Yahoo! and Google Toolbars.Option Explicit:On Error Resume NextDim WshShell,a,i:i=0:Set WshShell=WScript.CreateObject("WScript.Shell")a=WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{2318C2B1-4965-11d4-9B18-009027A5CD4F}\UninstallString")If a<>"" Then WshShell.Run(a&" /S"),1,True:i=i+1a=WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Yahoo! Companion\UninstallString")If a<>"" Then WshShell.Run(""""&a&""" /S"),1,True:i=i+1WshShell=Nothing:Wscript.Quit(i)

It is the only file you need, however if you really only want to remove one and not the other (which I don't reccomend because they're both spyware) then you can use either of these:

REMYAHOO.VBS:
' © 2006 Plamdi.com. This file silently uninstalls the Yahoo! Toolbar.Option Explicit:On Error Resume NextDim WshShell,a,i:i=0:Set WshShell=WScript.CreateObject("WScript.Shell")a=WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Yahoo! Companion\UninstallString")If a<>"" Then WshShell.Run(""""&a&""" /S"),1,True:i=i+1WshShell=Nothing:Wscript.Quit(i)

REMGOOGL.VBS:
' © 2006 Plamdi.com. This file silently uninstalls the Google Toolbar.Option Explicit:On Error Resume NextDim WshShell,a,i:i=0:Set WshShell=WScript.CreateObject("WScript.Shell")a=WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{2318C2B1-4965-11d4-9B18-009027A5CD4F}\UninstallString")WshShell=Nothing:Wscript.Quit(i)

On my original post, user chrismholmes contributed removal of some additional items. The ones that use SendKeys and Sleep I don't reccomend using like this, rather use OEM Installer above for these needs - it's a far more robust program for these needs and less prone to errors. It also waits for the programs to terminate before quitting, which is useful for RunOnceEX because your next item won't be processed until it is done. Anyway, here is a version that will also remove the AOL and Ask toolbars, so long as chrismholmes's code was correct (I have not tested it, use at your own discression):

' © 2008 Plamdi.com. This file silently uninstalls the Yahoo!, Google, Ask and AOL Toolbars.Option Explicit:On Error Resume NextDim WshShell,a,i:i=0:Set WshShell=WScript.CreateObject("WScript.Shell")a=WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{2318C2B1-4965-11d4-9B18-009027A5CD4F}\UninstallString")If a<>"" Then WshShell.Run(a&" /S"),1,True:i=i+1a=WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Yahoo! Companion\UninstallString")If a<>"" Then WshShell.Run(""""&a&""" /S"),1,True:i=i+1a=WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\AOL Toolbar\Uninstallstring")If a<>"" Then WshShell.Run(a&" /S"),1,True:i=i+1a=WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Ask Toolbar for Internet Explorer_is1\uninstallString")If a<>"" Then WshShell.Run(a&" /SILENT"),1,True:i=i+1WshShell=Nothing:Wscript.Quit(i)

7. Archive icons. These are useful it if annoys you (like it does me) when all zip, rar, 7z archives are set to appear as the same file type. The icons are attached, save them to System32 - and here is a custom file to set the icon for several archives types:

SETARCHIVES.CMD:
@ECHO OFFREG ADD HKCR\.iso /VE /D "isofile" /FREG ADD HKCR\.iso /V "Content Type" /D "application/x-zip-compressed" /FREG ADD HKCR\isofile /VE /D "ISO Archive" /FREG ADD HKCR\isofile\DefaultIcon /VE /D "%SystemRoot%\System32\shell32.dll,188" /FREG ADD HKCR\.zip /VE /D "zipfile" /FREG ADD HKCR\.zip /V "Content Type" /D "application/x-zip-compressed" /FREG ADD HKCR\zipfile /VE /D "ZIP Archive" /FREG ADD HKCR\zipfile\DefaultIcon /VE /D "%SystemRoot%\System32\zip.ico" /FREG ADD HKCR\.tar /VE /D "tarfile" /FREG ADD HKCR\.tar /V "Content Type" /D "application/x-zip-compressed" /FREG ADD HKCR\tarfile /VE /D "TAR Archive" /FREG ADD HKCR\tarfile\DefaultIcon /VE /D "%SystemRoot%\System32\zip.ico" /FREG ADD HKCR\.gz /VE /D "gzipfile" /FREG ADD HKCR\.tgz /VE /D "gzipfile" /FREG ADD HKCR\.gz /V "Content Type" /D "application/x-zip-compressed" /FREG ADD HKCR\.tgz /V "Content Type" /D "application/x-zip-compressed" /FREG ADD HKCR\gzipfile /VE /D "gzip archive" /FREG ADD HKCR\gzipfile\DefaultIcon /VE /D "%SystemRoot%\System32\zip.ico" /FREG ADD HKCR\.bz2 /VE /D "bzipfile" /FREG ADD HKCR\.tbz2 /VE /D "bzipfile" /FREG ADD HKCR\.tb2 /VE /D "bzipfile" /FREG ADD HKCR\.bz2 /V "Content Type" /D "application/x-zip-compressed" /FREG ADD HKCR\.tbz2 /V "Content Type" /D "application/x-zip-compressed" /FREG ADD HKCR\.tb2 /V "Content Type" /D "application/x-zip-compressed" /FREG ADD HKCR\bzipfile /VE /D "bzip2 compressed file" /FREG ADD HKCR\bzipfile\DefaultIcon /VE /D "%SystemRoot%\System32\zip.ico" /FREG ADD HKCR\.7z /VE /D "7zipfile" /FREG ADD HKCR\.7z /V "Content Type" /D "application/x-zip-compressed" /FREG ADD HKCR\7zipfile /VE /D "7-Zip Archive" /FREG ADD HKCR\7zipfile\DefaultIcon /VE /D "%PROGRAMFILES%\7-Zip\7zFM.exe" /FREG ADD HKCR\.rar /VE /D "rarfile" /FREG ADD HKCR\.rar /V "Content Type" /D "application/x-zip-compressed" /FREG ADD HKCR\rarfile /VE /D "RAR Archive" /FREG ADD HKCR\rarfile\DefaultIcon /VE /D "%SystemRoot%\System32\rar.ico" /FREG ADD HKCR\.lha /VE /D "lhafile" /FREG ADD HKCR\.lha /V "Content Type" /D "application/x-zip-compressed" /FREG ADD HKCR\.lhz /VE /D "lhafile" /FREG ADD HKCR\.lhz /V "Content Type" /D "application/x-zip-compressed" /FREG ADD HKCR\lhafile /VE /D "LHA Archive" /FREG ADD HKCR\lhafile\DefaultIcon /VE /D "%SystemRoot%\System32\zip.ico" /FREG ADD HKCR\.ace /VE /D "acefile" /FREG ADD HKCR\.ace /V "Content Type" /D "application/x-zip-compressed" /FREG ADD HKCR\acefile /VE /D "ACE Archive" /FREG ADD HKCR\acefile\DefaultIcon /VE /D "%SystemRoot%\System32\zip.ico" /FREG ADD HKCR\.arj /VE /D "arjfile" /FREG ADD HKCR\.arj /V "Content Type" /D "application/x-zip-compressed" /FREG ADD HKCR\arjfile /VE /D "ARJ Archive" /FREG ADD HKCR\arjfile\DefaultIcon /VE /D "%SystemRoot%\System32\zip.ico" /F

8. There's also a great program called FavOrg that restores all your favourite icons for you, cause after all it's annoying as hell when you install fresh and there's no favicons in your favourites that you just copied back!!!

It's not my program, obviously, but everyone should have it! Get it here

9. And there is another extension I just LOVE called HashTab, Get it here! It adds MD5, SHA1 and CRC32 hashes to a tab in file properties, awesome!

That's all for now, like I said I recommend pinning this topic, as it's absolutely crammed with goodies!

Attached Files

  • Attached File  ICONS.7z   30.75KB   28 downloads

Edited by Yzöwl, 26 February 2008 - 05:35 AM.
Code tags changed again to help with page formatting!



How to remove advertisement from MSFN

#2
Plamdi

Plamdi

    Junior

  • Member
  • Pip
  • 82 posts
  • Joined 22-March 06
Some more of my favourites!

These are some more extensions that are really handy to have, for PNG and JPEG.

  • Edit PNG chunks - This requires the freeware tool TweakPNG. This is an incredibly, incredibly useful tool.
  • Edit JPEG comments - This requires the freeware tool edjpgcom. This is also an incredibly, incredibly useful tool.

Edit PNG chunks... paste the following into Wordpad and save as pngchunk.vbs.
' © 2008 plamdi.com, this file must not be sold, you may distribute it' freely so long as it remains unmodified with all internal documentation.'' This program is designed for use with TweakPNG. It will add or remove' a shell extension for editing PNG image file chunks.' In no way am I affiliated with TweakPNG.'' Installation:' 1. Ensure there is a copy of TweakPNG (tweakpng.exe) located in your'    WINDOWS\SYSTEM32 directory.' 1. Double click on pngchunk.vbs to install/uninstall' 2. Run "WScript.exe pngchunk.vbs" from a command prompt or the run dialogue.' 3. Run "WScript.exe pngchunk.vbs /s" to achieve a silent installation.'' Usage:' Right click a PNG image file, and click "Edit PNG Chunks".'' Notes on installation:' pngchunk.vbs can be run from anywhere to install so long as TweakPNG is in' your SYSTEM32 directory. The script will not install the extension if' TweakPNG isn't detected, but will uninstall if asked. If you wish to locate' the file elsewhere, simply copy this file to the folder where TweakPNG' resides and run from there.'' When this file is run it will automatically place a copy into your System32' folder, you may delete any other installation point as it will not be needed.'' You can uninstall the shell extensions through "Add or Remove Programs" in' Control Panel.'' If you prefer you can use /silent instead of /s. Silent installations' suppress error messages if it cannot be installed.'' --------------------------------------------------------------------------Option Explicit:On Error Resume NextDim WshShell,fso,f,o,p,t,v,w,tmp:w=0Set WshShell=WScript.CreateObject("WScript.Shell")Set fso=CreateObject("Scripting.FileSystemObject")p=Left(WScript.ScriptFullName,Len(WScript.ScriptFullName)-Len(WScript.ScriptName))If Wscript.Arguments.Count=1 Then If Wscript.Arguments(0)="/REM" Then  v=MsgBox("Are you sure you want to remove the edit-PNG-chunks shell extension?",292,"Remove shell extension confirmation")  If v=7 Then WshShell=Nothing:Wscript.Quit(1)  w=7 ElseIf UCase(Wscript.Arguments(0))="/S" Or UCase(Wscript.Arguments(0))="/SILENT" Then  w=6 Else  ErrHndlr() End IfElseIf Wscript.Arguments.Count<>0 Then ErrHndlr()End IfIf fso.fileexists(p&"tweakpng.exe") Then If UCase(WScript.ScriptFullName)<>UCase(p&"PNGCHUNK.VBS") Then  fso.CopyFile WScript.ScriptFullName,p&"pngchunk.vbs" End IfElse If fso.fileexists(WshShell.Environment("PROCESS")("SystemRoot")&"\System32\tweakpng.exe") Then  p=WshShell.Environment("PROCESS")("SystemRoot")&"\System32\"  fso.CopyFile WScript.ScriptFullName,p&"pngchunk.vbs" Else  If w=6 Then   WshShell=Nothing:Wscript.Quit(0)  ElseIf w<>7 Then   v=MsgBox("TweakPNG not found. Would you like to remove the shell extension?",292,"Remove shell extension")   If v=7 Then WshShell=Nothing:Wscript.Quit(1)  End If End IfEnd IfIf w=0 Then w=MsgBox("Do you want the edit-PNG-chunks shell extension?",292,"Enable/Disable shell extension")t=WshShell.RegRead("HKCR\.png\")If t<>"" Then t="HKCR\"&t&"\shell\edit_png_chunk\" If w=6 Then  WshShell.RegWrite t,"Edit PNG Chunks"  WshShell.RegWrite t&"command\",""""&p&"tweakpng.exe"" ""%d""" Else  WshShell.RegDelete t&"command\":WshShell.RegDelete t End If t="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\pngchunk\" If w=6 Then  WshShell.RegWrite t,""  WshShell.RegWrite t&"DisplayName","Edit PNG Chunks Shell Extension (Removal)"  WshShell.RegWrite t&"UninstallString","WScript.exe """&p&"pngchunk.vbs"" /REM"  WshShell.RegWrite t&"NoModify",1,"REG_DWORD"  WshShell.RegWrite t&"NoRepair",1,"REG_DWORD" Else  WshShell.RegDelete t&"NoModify":WshShell.RegDelete t&"NoRepair"  WshShell.RegDelete t&"UninstallString":WshShell.RegDelete t&"DisplayName":WshShell.RegDelete t  fso.DeleteFile(p&"pngchunk.vbs") End IfEnd IfSet WshShell=NothingWscript.Quit(1)sub ErrHndlr() MsgBox "Invalid parameters were given. The only correct user command line is /s or /silent.",16,"pngchunk.vbs error" Set WshShell=Nothing Wscript.Quit(0)End Sub

Edit JPEG comments... paste the following into Wordpad and save as jpegcomm.vbs.
' © 2008 plamdi.com, this file must not be sold, you may distribute it' freely so long as it remains unmodified with all internal documentation.'' This program is designed for use with Edjpgcom. It will add or remove' a shell extension for editing JPEG image file comments.' In no way am I affiliated with Edjpgcom.'' Installation:' 1. Ensure there is a copy of Edjpgcom (edjpgcom.exe) located in your'    WINDOWS\SYSTEM32 directory.' 1. Double click on jpegcomm.vbs to install/uninstall' 2. Run "WScript.exe jpegcomm.vbs" from a command prompt or the run dialogue.' 3. Run "WScript.exe jpegcomm.vbs /s" to achieve a silent installation.'' Usage:' Right click a JPEG image file, and click "Edit JPEG Comments".'' Notes on installation:' jpegcomm.vbs can be run from anywhere to install so long as Edjpgcom is in' your SYSTEM32 directory. The script will not install the extension if' Edjpgcom isn't detected, but will uninstall if asked. If you wish to locate' the file elsewhere, simply copy this file to the folder where Edjpgcom' resides and run from there.'' When this file is run it will automatically place a copy into your System32' folder, you may delete any other installation point as it will not be needed.'' You can uninstall the shell extensions through "Add or Remove Programs" in' Control Panel.'' If you prefer you can use /silent instead of /s. Silent installations' suppress error messages if it cannot be installed.'' --------------------------------------------------------------------------Option Explicit:On Error Resume NextDim WshShell,fso,f,o,p,t,v,w,tmp:w=0Set WshShell=WScript.CreateObject("WScript.Shell")Set fso=CreateObject("Scripting.FileSystemObject")p=Left(WScript.ScriptFullName,Len(WScript.ScriptFullName)-Len(WScript.ScriptName))If Wscript.Arguments.Count=1 Then If Wscript.Arguments(0)="/REM" Then  v=MsgBox("Are you sure you want to remove the edit-JPEG-comments shell extension?",292,"Remove shell extension confirmation")  If v=7 Then WshShell=Nothing:Wscript.Quit(1)  w=7 ElseIf UCase(Wscript.Arguments(0))="/S" Or UCase(Wscript.Arguments(0))="/SILENT" Then  w=6 Else  ErrHndlr() End IfElseIf Wscript.Arguments.Count<>0 Then ErrHndlr()End IfIf fso.fileexists(p&"edjpgcom.exe") Then If UCase(WScript.ScriptFullName)<>UCase(p&"JPEGCOMM.VBS") Then  fso.CopyFile WScript.ScriptFullName,p&"jpegcomm.vbs" End IfElse If fso.fileexists(WshShell.Environment("PROCESS")("SystemRoot")&"\System32\edjpgcom.exe") Then  p=WshShell.Environment("PROCESS")("SystemRoot")&"\System32\"  fso.CopyFile WScript.ScriptFullName,p&"jpegcomm.vbs" Else  If w=6 Then   WshShell=Nothing:Wscript.Quit(0)  ElseIf w<>7 Then   v=MsgBox("Edjpgcom not found. Would you like to remove the shell extension?",292,"Remove shell extension")   If v=7 Then WshShell=Nothing:Wscript.Quit(1)  End If End IfEnd IfIf w=0 Then w=MsgBox("Do you want the edit-JPEG-comments shell extension?",292,"Enable/Disable shell extension")t=WshShell.RegRead("HKCR\.jpg\")If t<>"" Then t="HKCR\"&t&"\shell\edit_jpg_comm\" If w=6 Then  WshShell.RegWrite t,"Edit JPEG Comments"  WshShell.RegWrite t&"command\",""""&p&"edjpgcom.exe"" ""%d""" Else  WshShell.RegDelete t&"command\":WshShell.RegDelete t End If t="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\jpegcomm\" If w=6 Then  WshShell.RegWrite t,""  WshShell.RegWrite t&"DisplayName","Edit JPEG Comments Shell Extension (Removal)"  WshShell.RegWrite t&"UninstallString","WScript.exe """&p&"jpegcomm.vbs"" /REM"  WshShell.RegWrite t&"NoModify",1,"REG_DWORD"  WshShell.RegWrite t&"NoRepair",1,"REG_DWORD" Else  WshShell.RegDelete t&"NoModify":WshShell.RegDelete t&"NoRepair"  WshShell.RegDelete t&"UninstallString":WshShell.RegDelete t&"DisplayName":WshShell.RegDelete t  fso.DeleteFile(p&"jpegcomm.vbs") End IfEnd IfSet WshShell=NothingWscript.Quit(1)sub ErrHndlr() MsgBox "Invalid parameters were given. The only correct user command line is /s or /silent.",16,"jpegcomm.vbs error" Set WshShell=Nothing Wscript.Quit(0)End Sub


#3
straus

straus
  • Member
  • 2 posts
  • Joined 15-September 07
Quickfind vbs is not working its giving an error, can anyone help!!

#4
Plamdi

Plamdi

    Junior

  • Member
  • Pip
  • 82 posts
  • Joined 22-March 06

Quickfind vbs is not working its giving an error, can anyone help!!

I just tested the version I posted here, and it's working fine for me. Follow the following steps:

1. copy the code.
2. open WordPad (not Notepad).
3. paste the code into WordPad.
4. click save.
5. select "Text Document" under "File name", and not "Rich Text Format", and put QFIND.VBS in the file name.
6. Run qfind.vbs to install.

#5
gooroo

gooroo
  • Member
  • 1 posts
  • Joined 30-July 09
Here is the code I used to remove Google, Yahoo!, AOL, and Ask, if anyone is having trouble with the colde from above. The previous code may be outdated (from chrisholmes)

Option Explicit:On Error Resume Next
Dim WshShell,a,i:i=0:Set WshShell=WScript.CreateObject("WScript.Shell")
a=WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{2318C2B1-4965-11d4-9B18-009027A5CD4F}\UninstallString")
If a<>"" Then WshShell.Run(a&" /S"),1,True:i=i+1
a=WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Yahoo! Companion\UninstallString")
If a<>"" Then WshShell.Run(""""&a&""" /S"),1,True:i=i+1
a=WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\AOL Toolbar\UninstallString")
If a<>"" Then WshShell.Run(a&" /S"),1,True:i=i+1
a=WshShell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{86D4B82A-ABED-442A-BE86-96357B70F4FE}\uninstallString")
If a<>"" Then WshShell.Run("MsiExec.exe /uninstall {86D4B82A-ABED-442A-BE86-96357B70F4FE} /qn"),1,True:i=i+1
WshShell=Nothing:Wscript.Quit(i)

I would like to see this added on to and used as a great login script to help prevent junk from accumulating on domain PCs




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users