Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| windows:win_tricks [2025/02/20 14:54] – created - external edit 127.0.0.1 | windows:win_tricks [2026/04/23 14:33] (current) – [Env Var Powershell] td | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== | + | # Windows tricks |
| - | ===== - Auto power on ===== | + | ## Auto power on |
| PS as admin: | PS as admin: | ||
| powercfg -devicequery wake_armed | powercfg -devicequery wake_armed | ||
| Line 10: | Line 10: | ||
| Mouse properties and disable wakeup. | Mouse properties and disable wakeup. | ||
| - | ===== - Powershell | + | ## Powershell |
| - | ==== - Execution policy | + | ### Execution policy |
| Open PS as admin and run: | Open PS as admin and run: | ||
| | | ||
| - | ==== - Run ps1 script | + | ### Run ps1 script |
| PS C: | PS C: | ||
| PS C: | PS C: | ||
| + | ## Env Var Powershell | ||
| + | |||
| + | (https:// | ||
| + | | ||
| + | After I installed JAVA from oracle website I set | ||
| + | |||
| + | [System.Environment]:: | ||
| + | |||
| + | To set java in the path I did, | ||
| + | |||
| + | [System.Environment]:: | ||
| + | |||
| + | Worked like a charm! | ||
| + | |||
| + | If you want to have it load up automatically when you open powershell you can do, | ||
| + | |||
| + | New-Item $profile -Type File -Force | ||
| + | |||
| + | and open in notepad like | ||
| + | |||
| + | notepad.exe $profile | ||
| + | and paste in | ||
| + | |||
| + | [System.Environment]:: | ||
| + | [System.Environment]:: | ||
| + | [System.Environment]:: | ||
| + | |||
| + | You can close the notepad now! Next, you want to allow powershell to run the ps script so don't forget to grant unrestricted access to running the profile script on load by, | ||
| + | |||
| + | Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser | ||
| + | |||
| + | Java should now be loaded after you reopen powershell. Thats it! | ||
| | | ||
| - | ===== - Git ===== | + | ## Gi |
| - | ==== - Ignore File mode ==== | + | t |
| + | ### Ignore File mode | ||
| git config --global core.fileMode false | git config --global core.fileMode false | ||