From 73745d5e0ffeece71682aea37e23561bbdc5189c Mon Sep 17 00:00:00 2001 From: Ambigapathy Vinayak Date: Thu, 13 Jun 2024 10:55:33 +0200 Subject: [PATCH] Windows setup working --- path.ps1 | 9 ++++++--- setup.bat | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/path.ps1 b/path.ps1 index 2bbe13a..ee24eef 100644 --- a/path.ps1 +++ b/path.ps1 @@ -1,8 +1,11 @@ -echo Searching path in env PATH +echo "Searching path in env PATH" $PATH = [Environment]::GetEnvironmentVariable("PATH", "Machine") $bakasable_path = "C:\Program Files\bakasable" if( $PATH -notlike "*"+$bakasable_path+"*" ){ - echo Path not found in env PATH - echo Adding path + echo "Path not found in env PATH" + echo "Adding path" [Environment]::SetEnvironmentVariable("PATH", "$PATH;$bakasable_path", "Machine") +} +else { + echo "Path already added" } \ No newline at end of file diff --git a/setup.bat b/setup.bat index 3d9a310..5f02fd1 100644 --- a/setup.bat +++ b/setup.bat @@ -9,4 +9,4 @@ md "C:\Program Files\bakasable\cache" xcopy /y .\bin\windows\bakasable.exe "C:\Program Files\bakasable" xcopy /y .\bin\windows\premake5.exe "C:\Program Files\bakasable" -powershell path.ps1 \ No newline at end of file +powershell .\path.ps1 \ No newline at end of file