Skip to content
This repository has been archived by the owner on Jul 8, 2022. It is now read-only.

Adding handy Powershell script to apply the mod on Windows #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tevert
Copy link

@tevert tevert commented Feb 13, 2018

Works for Windows 10, Slack 3.0.5. Automatically checks installation directory for the latest present version and applies the mod to that.

@suyasha0
Copy link

Did not work, I get this.
2018-02-19 5 _li
Windows 10, Slack 3.0.5.

@tevert
Copy link
Author

tevert commented Feb 20, 2018

Huh, weird - did you override your HOMEPATH environment variable? It uses that to locate your Slack installs; it should be set to "\Users\YourUsername" on Windows machines.

@suyasha0
Copy link

I think my HOMEPATH is already set to that. Here is what PowerShell shows.
2018-02-20
Is there another command I should be using?

@tevert
Copy link
Author

tevert commented Feb 20, 2018

Try echo $env:HOMEPATH

@suyasha0
Copy link

I get "\Users\MyUsername".

@tevert
Copy link
Author

tevert commented Feb 20, 2018

Oh I see now I was looking in the wrong place for that error - this script looks for Slack versions in \Users\MyUsername\AppData\Local\slack\ - can you dir that directory?

@suyasha0
Copy link

I see- I did that and I realize that I don't have the files there. Is this normal?
2018-02-20 1 _li

@tevert
Copy link
Author

tevert commented Feb 20, 2018

That's where Slack installed itself on my machine - Apparently yours put itself somewhere else.

I think I'll need to rework the script to use a registry key or something to find it. For curiosity's sake, did yours end up Program Files or did you pick a whole new location?

@suyasha0
Copy link

Couldn't find it and had to reinstall Slack. Now it works though, thanks!

@@ -0,0 +1,80 @@
$slackBaseDir = "$env:HOMEPATH\AppData\Local\slack\"
Copy link

@kilasuit kilasuit Apr 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this to $env:LocalAppData\Slack - as will this will resolve the Slack path correctly

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants