1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Powershell scripts not opening in notepad-TC main suspect

Discussion in 'Support' started by bravotango, Aug 12, 2012.

  1. bravotango

    Joined:
    Jan 30, 2010
    Messages:
    21
    Likes Received:
    0
    I have just started using Powershell mainly because I need the ability to change affinity in a running program.
    Everything is set up correctly with a simple profile in MyDocuments/WindowsPowershell and I have used Set-ExecutionPolicy RemoteSigned.
    I have scripts in a separate folder in MyDocuments/Scripts and my Powershell shortcut on desktop opens Powershell in that folder.
    Up til now whenever I double clicked on a script it would open in notepad which was OK when I was editing the scripts but suddenly when I double click on a script it is actually running in Powershell. I prefer this as it saves me opening Powershell but just wondering what sort of behaviour would cause this to happen.
    The only odd thing I can think of is that I opened Take Command to see if I could run some PS commands from the TC console. After closing TC the behaviour is still persisting.
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,809
    Likes Received:
    82
    It doesn't have anything to do with Take Command. Something else (probaby in PowerShell) changed your file associations in the registry so that a PowerShell script is now associated with PS instead of Notepad.
     
  3. bravotango

    Joined:
    Jan 30, 2010
    Messages:
    21
    Likes Received:
    0
    My apologies Rex. Your advice is correct. I found another program changed the file associations the previous day.
    I am very happy with being able to run the PS scripts without opening PS but I forgot the activity the previous day.
    Memory starting to decay (mine).
     

Share This Page