3

On Win7 64bit, i need to edit the powershell_ise.exe.config file Located in C:\Windows\System32\WindowsPowerShell\v1.0\powershell_ise.exe.config.

Even after a clean reboot and open the file in notepad++ with admin rights, i cannot save any changes. "Save Filed Error" "check if this file is opened in another program."

Powershell v3/v4.

does anyone know why or the trick to edit it?

user1161137
  • 1,067
  • 1
  • 11
  • 31
  • how can i improve this question.. it's very specific and seemingly straight forward. this file always seems locked and doesn't look like a way to edit it. why am i getting down rated? – user1161137 Dec 15 '15 at 22:32
  • the reason this is needed is because prior to using POWERSHELL v5, you can't seem to add custom cmdlets for use in the ISE such that certain binding dependencies are DIFFERENT. So in order to get the custom cmdlets to work , you need to edit this config file!!! and it doesn't seem possible to EDIT it. man... such disrespect from ppl... Was this really needed to explain rather than getting down voted! – user1161137 Dec 17 '15 at 17:53

2 Answers2

2

I think your question does not belong here, it is not related to development but file access and permissions. I'll make an answer anyway.

Permissions on the file do not allow modification, even for Administrators (that is what I see on my system).

You may need to take ownership over the file to change this.

I don't know if this change is recommended, I did not try it.

enter image description here

sodawillow
  • 12,497
  • 4
  • 34
  • 44
  • 1
    tx for the help... what seemed to work is a combination... no matter what i did i could not edit the file (even with the ISE not running). BUT i renamed the file to something else... then i could edit the file.. .then i renamed it back. (any further changes, still requires me to rename to change.. and rename it back). All under an editor with admin rights. Don't know if ownership made a difference in this case. didn't really go back to try it.. these sets should help others though. – user1161137 Jan 04 '16 at 19:16
  • i will give this as the combination as a solution – user1161137 Jan 04 '16 at 19:16
0

The powershell_ise.exe.config file is owned by TrustedInstaller. You can use Nirsoft's AdvancedRun utility to open Notepad as TrustedInstaller and modify and save the file.

Opening Notepad.exe as TrustedInstaller with AdvancedRun screenshot

Paul π
  • 133
  • 11