CaptainBeardsEyesBeard Posted December 19, 2022 Posted December 19, 2022 Hi I'm trying to start Teams but as the Teams.exe is located in the profile folder it'll be different for different users. Any ideas on a solution? I've tried the below to no joy WriteToConsoleAndLog("-----Log: Run Teams.exe") Run("%userprofile%\AppData\Local\Microsoft\Teams\current\Teams.exe") if @error then Msgbox(16, "", "ERROR launching Teams.exe-> Attempting to launch Teams") WriteToConsoleAndLog("----ERROR launching Teams.exe-> Attempting to launch Teams") endif
SOLVE-SMART Posted December 19, 2022 Posted December 19, 2022 (edited) Hi @CaptainBeardsEyesBeard, what is the exact output/error of your Run() approach? Have you already tried ShellExecute() / ShellExecuteWait() instead? Btw: 💡 As far as I can see, the teams.exe is located under: %LocalAppData%\Microsoft\Teams\current\ I don't get your pain point to be honest 🤔 .Best regardsSven________________Stay innovative! Edited December 19, 2022 by SOLVE-SMART ==> AutoIt related: 🔗 GitHub, 🔗 Discord Server, 🔗 Cheat Sheet Spoiler 🌍 Au3Forums 🎲 AutoIt (en) Cheat Sheet 📊 AutoIt limits/defaults 💎 Code Katas: [...] (comming soon) 🎭 Collection of GitHub users with AutoIt projects 🐞 False-Positives 🔮 Me on GitHub 💬 Opinion about new forum sub category 📑 UDF wiki list ✂ VSCode-AutoItSnippets 📑 WebDriver FAQs 👨🏫 WebDriver Tutorial (coming soon)
Danp2 Posted December 19, 2022 Posted December 19, 2022 Try changing your Run command to this, which works for me -- Run(@UserProfileDir & "\AppData\Local\Microsoft\Teams\current\Teams.exe") Latest Webdriver UDF Release Webdriver Wiki FAQs
Subz Posted December 19, 2022 Posted December 19, 2022 The default method for starting Teams can be found here (when setup to start on first logon) Key =: HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run Val =: com.squirrel.Teams.Teams Run(@LocalAppData & '\Microsoft\Teams\Update.exe --processStart "Teams.exe" --process-start-args "--system-initiated"')
CaptainBeardsEyesBeard Posted December 20, 2022 Author Posted December 20, 2022 Thanks for replies, this one worked 17 hours ago, Danp2 said: Try changing your Run command to this, which works for me -- Run(@UserProfileDir & "\AppData\Local\Microsoft\Teams\current\Teams.exe")
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now