Hi. Sorry if this explained elsewhere but I couldn't quite find the answer I'm looking for.
Just wondering if I can change the location of pshazz from /scoop/apps and /scoop/shims to something like C:\dev\stuff
If so, what do I have to change (eg. path references)? Do I have to move the whole of scoop (is that even possible with reinstalling)? Do I have to edit the $path variable in /scoop/shims/pshazz.ps1?
I'm a novice, so I'm just throwing out the things I can think of.
I just find the location of scoop in appdata kind of awkward; pshazz gets buried and I end up forgetting about it until I look in my powershell profile.
Any help would be appreciated. Thanks.
You can use the $env:SCOOP environment variable to change the install location to something other than ~\appdata\local\scoop. You can set it directly, but that only lasts for the current powershell session, so you probably want to do this instead:
[environment]::setEnvironmentVariable('SCOOP','C:\dev\stuff','User')
You should do this before you install Scoop, so you'll need to run scoop uninstall scoop if you've already installed it. If you want to keep what you've already installed, it could get messy but the steps are:
~\appdata\local\scoop\ somewhere elsescoop uninstall scoop$env:SCOOPiex (new-object net.webclient).downloadstring('https://get.scoop.sh')Hope that helps.
Thanks for the reply. I don't mind doing a fresh install. Will report back if I encounter difficulties.
This approach worked for my. Setting the SCOOP environment variable to a local path worked as advertised. Scoop is now installing files locally rather on the network drive. We should probably add this to the wiki.
No difficulties reported.
This no longer seems to work :\
Your solution from issue #427 works:
$env:scoop = 'e:\Develop\scoop'
@Zeklandia that only lasts for the duration of the current PowerShell session.
@lukesampson Is that an issue? I was able to use the solution from #427 to install Scoop to a specific folder and it still works out of that folder to this day.
@Zeklandia If you didn't persist the SCOOP environment variable for your user or machine, Scoop itself might be running from a non-default folder, but apps might still be installing under the default folder, ~/scoop.
Setting $env:SCOOP = C:\some\path is not enough, as far as I know. See my first comment above on how to persist the SCOOP variable.
@lukesampson Strange, because I don't even have a ~/scoop and the apps are visible in the path I defined. Although, whenever scoop tries to update itself (i.e. scoop update) it fails with this error:
```rm : Cannot find path 'C:\Users\Zeklandia\Apps\appsscoop\current' because it does not exist.
At C:\Users\Zeklandia\Appsscoop\appsscoop\current\libexecscoop-update.ps1:69 char:9
C:\Users\Zeklandia\Apps\scoop is where I installed it.
It would be good if this is added to the project wiki, as it's quite often that the default install directory HAS to be changed
This is pretty old, but it still works.
Most helpful comment
You can use the
$env:SCOOPenvironment variable to change the install location to something other than~\appdata\local\scoop. You can set it directly, but that only lasts for the current powershell session, so you probably want to do this instead:You should do this before you install Scoop, so you'll need to run
scoop uninstall scoopif you've already installed it. If you want to keep what you've already installed, it could get messy but the steps are:~\appdata\local\scoop\somewhere elsescoop uninstall scoop$env:SCOOPiex (new-object net.webclient).downloadstring('https://get.scoop.sh')Hope that helps.