Jump to content
George Stokes

How to run batch script as end user

Recommended Posts

Hi all,

Hoping you can help a budding Automate scripter. 

I'm currently trying to run a script to remove slack for all users.

I installed locally and found I can uninstall Slack using: "%LocalAppData%\slack\Update.exe" --uninstall -s

However when I try and run a console Shell script in Automate against my test PC I get the error "Console Execute failed".

My end goal is to be able to run this script against a whole company to remove Slack installations a they've migrated to Microsoft Teams.

Apologies for probably a basic question. As you can probably tell I'm quite new to scripting!

Best Regards,

George Stokes

Share this post


Link to post
Share on other sites

Hi Wesley, 

Thanks so much for the above very informative! 

I've setup the script as you recommended so Step 1 matches the screenshot above and step 2 inputting the command: "%LocalAppData%\slack\Update.exe" --uninstall -s which I've tested from running on my test pc as a local user with no admin rights and it uninstalls slack as intended.

However when I input this into the script and run it against the same test PC after re-installing it returns the error: The reason: Console Shell Command Failed

So it would seem I'm now successfully opening a console session on the PC but the command itself is failing?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...