My Wiki!

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
windows:win_tricks [2026/04/23 14:26] tdwindows:win_tricks [2026/05/12 12:53] (current) – [Run ps1 script] td
Line 15: Line 15:
 Open PS as admin and run: Open PS as admin and run:
      Set-ExecutionPolicy Unrestricted      Set-ExecutionPolicy Unrestricted
- 
 ### Run ps1 script ### Run ps1 script
     PS C:\Users\Thuy Dang\Workspace\00_current\gwui> Set-ExecutionPolicy Unrestricted -Scope Process     PS C:\Users\Thuy Dang\Workspace\00_current\gwui> Set-ExecutionPolicy Unrestricted -Scope Process
     PS C:\Users\Thuy Dang\Workspace\00_current\gwui> PowerShell.exe -ExecutionPolicy Bypass -File C:\Windows\System32\WindowsPowerShell\v1.0\profile.ps1     PS C:\Users\Thuy Dang\Workspace\00_current\gwui> PowerShell.exe -ExecutionPolicy Bypass -File C:\Windows\System32\WindowsPowerShell\v1.0\profile.ps1
- 
 ## Env Var Powershell ## Env Var Powershell
  
Line 43: Line 41:
 and paste in and paste in
  
-    [System.Environment]::SetEnvironmentVariable("JAVA_HOME", "C:\Program Files\Java\jdk-13.0.1") +    [System.Environment]::SetEnvironmentVariable("JAVA_HOME", "D:\devfs\jdk-21.0.10+7"
-    [System.Environment]::SetEnvironmentVariable("Path", [System.Environment]::GetEnvironmentVariable('Path', [System.EnvironmentVariableTarget]::Machine) + ";$($env:JAVA_HOME)\bin")+    [System.Environment]::SetEnvironmentVariable("MAVEN_HOME", "D:\devfs\apache-maven-3.9.15") 
 +    [System.Environment]::SetEnvironmentVariable("Path", [System.Environment]::GetEnvironmentVariable('Path', [System.EnvironmentVariableTarget]::Machine) + ";$($env:JAVA_HOME)\bin";$($env:MAVEN_HOME)\bin")
  
 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, 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,
Line 52: Line 51:
 Java should now be loaded after you reopen powershell. Thats it!     Java should now be loaded after you reopen powershell. Thats it!    
          
-## Git+## Gi 
 +t
 ### Ignore File mode ### Ignore File mode
 git config --global core.fileMode false git config --global core.fileMode false

Navigation