Skip to content

Commit f351d78

Browse files
Jan Wedel (BCI/ESW42)simonharrer
authored andcommitted
Updated windows script to wirk without admin rights
1 parent 69e8549 commit f351d78

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

install.cmd

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33

44
echo Installing 'mob' ...
55

6-
setx MOB_HOME "%USERPROFILE%\.mob"
6+
REM set variable for local script
7+
set MOB_HOME=%USERPROFILE%\.mob
8+
REM set for user, not visible for current shell
9+
setx MOB_HOME "%MOB_HOME%"
710
set target="%MOB_HOME%"
811

912
if not exist %target% (
@@ -15,8 +18,8 @@ go build mob.go
1518
copy mob.exe %target%
1619
echo 'mob.exe' installed to %target%
1720

18-
REM add MOB_HOME to PATH
19-
echo %path%|find /i "%MOB_HOME%">nul || set path=%path%;%MOB_HOME%
21+
REM add MOB_HOME to PATH, not used in current shell
22+
echo %path%|find /i "%MOB_HOME%">nul || setx path "%path%;%MOB_HOME%"
2023

2124
echo 'mob' successfully installed.
2225
pause

0 commit comments

Comments
 (0)