Results 1 to 6 of 6
  1. #1
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    6,192
    Thanks
    201
    Thanked 784 Times in 718 Posts

    File associations and shortcut menu

    Hey Y'all,

    Here's an interesting problem.

    If I associate my PowerShell scripts (filetype: .ps1) with NotePad I get the following shortcut menu in Windows Explorer.
    PSRightClick.JPG

    However, if I associate the .ps1 filetype with NotePad++ the Run with PowerShell option disappears.

    Anyone know how I can get this option back while leaving the association set to NotePad++?

    May the Forces of good computing be with you!

    RG

    VBA Rules!

    My Systems: Desktop Specs
    Laptop Specs


  2. #2
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    20,538
    Thanks
    1
    Thanked 614 Times in 550 Posts
    It don't think you can have it both ways. The file association for the "run" can't be multiple actions concurrently.

    Joe

  3. #3
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    6,192
    Thanks
    201
    Thanked 784 Times in 718 Posts
    Joe,

    I don't want two actions for the file Association. It the graphic above the file association is NotePad and it has the ShortCut menu option to "Run with PowerShell". However, if I change the file Association to NotePad++ I lose the ShortCut menu option! Why? Or better still is there a way to get it back?
    May the Forces of good computing be with you!

    RG

    VBA Rules!

    My Systems: Desktop Specs
    Laptop Specs


  4. #4
    3 Star Lounger KritzX's Avatar
    Join Date
    Jun 2014
    Posts
    380
    Thanks
    15
    Thanked 42 Times in 42 Posts
    Hey RG! Spent some time googling around and came up with this:

    http://social.technet.microsoft.com/...pen-powershell

    Hope this helps!
    Fact of Life:

    “Real stupidity beats artificial intelligence every time.”
    Terry Pratchett

  5. The Following User Says Thank You to KritzX For This Useful Post:

    RetiredGeek (2014-08-04)

  6. #5
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    6,192
    Thanks
    201
    Thanked 784 Times in 718 Posts
    KritzX,

    Thanks! I perused that post and found what I needed.
    Registry Key: HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\She ll\Open\Command
    Change Value from: "C:\Windows\System32\Notepad.exe" "%1"
    Change Value to: "C:\Program Files (x86)\Notepad++\notepad++.exe" "%1"

    Now double-clicking opens the script in NotePad++ and right clicking gets me this.
    PSRightClick.JPG

    Thanks again!
    May the Forces of good computing be with you!

    RG

    VBA Rules!

    My Systems: Desktop Specs
    Laptop Specs


  7. #6
    3 Star Lounger KritzX's Avatar
    Join Date
    Jun 2014
    Posts
    380
    Thanks
    15
    Thanked 42 Times in 42 Posts
    Glad I could help RG. Have a great day!
    Fact of Life:

    “Real stupidity beats artificial intelligence every time.”
    Terry Pratchett

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •