Pin to taskbar

Page 2 of 2 FirstFirst 12

  1. Posts : 15
    Windows 7 RTM x64
    Thread Starter
       #11

    :) Thanks JohnGalt! Works well!
      My Computer


  2. Posts : 17
    7
       #12

    can't work eoxpin


    johngalt,
    tried exopin, thanks for discovering it, followed your seemingly easy instructions, can't get it to work. Say for example i put eoxpin in c:, and say I, for simplicity, wanted to pin IT to the taskbar. After starting eoxpin, would I type eoxpin c:\eoxpin -s
    I tried different progs to pin and different usage like with .exe and without the -s, but can't work it, can you help? I want to ultimately pin an aero/peak show desktop to the middle or left side of taskbar. At this point just to get a centered\left show desktop icon on taskbar, I've added a new toolbar, a show desktop shortcut where I want it on the left, but whenever I engage auto-hide the new toolbar disapears and I have to remake. thanks, jm
      My Computer


  3. Posts : 7
    Windows 7 RC build 7100; Windows XP Pro; Linux (Ubuntu Jaunty, Back|Track 4)
       #13

    Hi, jmacie

    I've never used eoxpin, but I think I can see what you do wrong here:

    On eoxsys.com (where you downloaded eoxpin) you can see how it should be used:
    It says: Usage: eoxpin.exe ["filename"] -s
    Which means you have to run it from a command line (Window key+R and run "cmd"), not just double click on the executable! And "filename" means file name, including the ".exe".
    Use these commands (assuming eoxpin is in "C:\eoxpin.exe"):
    cd C:\
    eoxpin.exe "C:\eoxpin.exe" -s

    That should do it.
      My Computer


  4. Posts : 2
    Windows 7 Ultimate x64
       #14

    Programmatically add items to the Windows 7 Taskbar


    The following was put together based on ideas from other techs/coders and assumes that you are using an english version of Win7, as it uses Verbs (the items you see when you right click a file) to "Pin to Taskbar". Other languages will need to replace the text accordingly.
    These two scripts and batch file that I put together for my agency are currently being used, and are implemented via SCCM. It is applied on first logon for any user to any PC.
    We wanted to programmatically configure the icons on the Taskbar as follows -
    Remove:
    Windows Media Player
    Add:
    Outlook
    Change:
    Windows Explorer (Libraries) to Windows Explorer (Computer)
    Create the three files and put them in the same folder...
    ***************************************
    Name this script (Pin.vbs)
    ***************************************
    Set objShell = CreateObject("Shell.Application")
    Set filesystem = CreateObject("scripting.Filesystemobject")
    If filesystem.FileExists(Wscript.Arguments(0)) Then
    Set objFolder = objShell.Namespace(filesystem.GetParentFolderName(Wscript.Arguments(0)))
    Set objFolderItem = objFolder.ParseName(filesystem.GetFileName(WScript.Arguments(0)))
    Set colVerbs = objFolderItem.Verbs

    Select case WScript.Arguments(1)
    case 0
    For Each objVerb in colVerbs
    If Replace(objVerb.name, "&", "") = "Unpin from Taskbar" Then objVerb.DoIt
    Next
    case 1
    For Each objVerb in colVerbs
    If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
    Next
    case 2
    For Each objVerb in colVerbs
    If Replace(objVerb.name, "&", "") = "Install" Then objVerb.DoIt
    Next
    End Select
    End If
    ***************************************
    The following script can be used to programmatically create Shortcuts. I could have used a preconfigured .lnk file and just xcopy'd it, but this is just cooler :)
    You'll notice there are commented (') out sections for Shortcut Name. You can use one of the three depending on the way you'd like to reference the destination folder for the icon being created.
    ***************************************
    Name this script (MyExplorerLnk.vbs)
    ***************************************
    Set WshShell = WScript.CreateObject("WScript.Shell" )
    ' Shortcut Name (Special Folders)
    ' strLocation = WshShell.SpecialFolders("AllUsersDesktop" )
    ' Set oShellLink = WshShell.CreateShortcut(strLocation & "\Windows Explorer.lnk" )
    ' Shortcut Name (Environment Variables)
    strLocation = WshShell.ExpandEnvironmentStrings("%APPDATA%" )
    set oShellLink = WshShell.CreateShortcut(strLocation & "\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Windows Explorer.lnk" )
    ' Shortcut Name (Normal Path)
    ' Set oShellLink = WshShell.CreateShortcut("C:\Windows Explorer.lnk" )
    ' Path to application
    oShellLink.TargetPath = "%Windir%\explorer.exe"
    ' Command line arguments
    oShellLink.Arguments = " shell:MyComputerFolder"
    ' Window Style
    oShellLink.WindowStyle = 1
    ' Hotkey
    oShellLink.Hotkey = ""
    ' Icon for Shortcut
    oShellLink.IconLocation = "%windir%\explorer.exe"
    ' Shortcut Comment
    oShellLink.Description = "Windows Explorer"
    ' Working Directory
    oShellLink.WorkingDirectory = ""
    oShellLink.Save
    ***************************************
    The following Batch file is used to launch the above scripts, and also documents the use of Pin.vbs
    Our agency primarily uses Win XP, Win 7 x86, and Win 7 x64... hence the limited version check.
    ***************************************
    Name this Batch file (TBcustom.cmd)
    ***************************************
    :: Set Environment
    @ECHO OFF
    CLS
    TITLE Taskbar Customization Tool
    COLOR 3f
    PROMPT $s
    SET UsrPinTBar="%APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar"
    :: *** Usage - Pin.vbs
    :: *** WScript.exe "%~dp0\%~dp0\Pin.vbs" [drive:][path]filename [Argument]
    :: *** [Arguments] = 0 1 2
    :: *** 0 = Unpin from Taskbar
    :: *** 1 = Pin to Taskbar
    :: *** 2 = Install
    :: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    :: Identify Windows Version
    :: *** Assign ver output to variable VerResult ***
    FOR /F "delims=" %%A IN ('ver') Do Set VerResult=%%A
    :: *** Parse VerResult and assign variable according to OS version ***
    ECHO "%VerResult%" | find "Version 6.1" > nul && GOTO Windows7Var
    ECHO "%VerResult%" | find "Version 6.0" > nul && GOTO WindowsVistaVar
    ECHO "%VerResult%" | find "Version 5" > nul && GOTO :WindowsXPVar
    ECHO Error - Unexpected Version Information
    GOTO EOF
    :: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    :Windows7Var
    IF %processor_architecture%==x86 GOTO 7x86Var
    IF %processor_architecture%==AMD64 GOTO 7x64Var
    IF %processor_architecture%==IA64 GOTO 7x64Var
    GOTO EOF
    :: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    :WindowsVistaVar
    ECHO This PC is running Windows Vista
    :: *** Unsupported ***
    GOTO EOF
    :: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    :WindowsXPVar
    ECHO This PC is running Windows XP
    :: *** Unsupported ***
    GOTO EOF
    :: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    :7x86Var
    ECHO This PC is running Windows 7 32Bit
    :: *** REMOVE WINDOWS EXPLORER ***
    WScript.exe "%~dp0\Pin.vbs" "%APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Windows Explorer.lnk" 0
    IF EXIST "%UsrPinTBar%\Windows Explorer.lnk" DEL /q /f "%UsrPinTBar%\Windows Explorer.lnk"
    :: *** REMOVE WINDOWS MEDIA PLAYER ***
    WScript.exe "%~dp0\Pin.vbs" "%APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Windows Media Player.lnk" 0
    IF EXIST "%UsrPinTBar%\Windows Media Player.lnk" DEL /q /f "%UsrPinTBar%\Windows Media Player.lnk"
    :: *** ADD CUSTOM WINDOWS EXPLORER (opens to shell:MyComputerFolder) ***
    WScript.exe "%~dp0\Pin.vbs" %windir%\explorer.exe 1
    WScript.exe "%~dp0\MyExplorerLnk.vbs"
    :: *** ADD OUTLOOK***
    WScript.exe "%~dp0\Pin.vbs" "%ProgramFiles%\Microsoft Office\Office14\Outlook.exe" 1
    GOTO EOF
    :: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    :7x64Var
    ECHO This PC is running Windows 7 64Bit
    :: *** REMOVE WINDOWS EXPLORER ***
    WScript.exe "%~dp0\Pin.vbs" "%APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Windows Explorer.lnk" 0
    IF EXIST "%UsrPinTBar%\Windows Explorer.lnk" DEL /q /f "%UsrPinTBar%\Windows Explorer.lnk"
    :: *** REMOVE WINDOWS MEDIA PLAYER ***
    WScript.exe "%~dp0\Pin.vbs" "%APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\Windows Media Player.lnk" 0
    IF EXIST "%UsrPinTBar%\Windows Media Player.lnk" DEL /q /f "%UsrPinTBar%\Windows Media Player.lnk"
    :: *** ADD CUSTOM WINDOWS EXPLORER (opens to shell:MyComputerFolder)***
    WScript.exe "%~dp0\Pin.vbs" %windir%\explorer.exe 1
    WScript.exe "%~dp0\MyExplorerLnk.vbs"
    :: *** ADD OUTLOOK***
    WScript.exe "%~dp0\Pin.vbs" "%ProgramFiles% (x86)\Microsoft Office\Office14\Outlook.exe" 1
    GOTO EOF
    :: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    :EOF
    EXIT
    ***************************************
    This method is what worked best for our particular needs, as our agency deploys virgin OS images and customizes and deploys software as SCCM task sequences and packages. It also does not dictate that a user can't customize the Taskbar as they see fit, and won't remove their own customizations, as would other methods posted that replace the Taskband registry values.
    I hope this helps, and feel free to criticize or ask for assistance with it!
      My Computer


 
Page 2 of 2 FirstFirst 12

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 10:34.
Find Us