I want to open web browser with url my python script.
I have a more than 100+ user. I want to run the my python script with every user desktop portable chrome for ex. C:\Users\user1\Desktop\chrome\chrome.exe
My code;
import webbrowser import os url = 'http://example.com/' webbrowser.register('chrome', None, webbrowser.BackgroundBrowser(r"C:\Users\**user1**\Desktop\chrome\chrome.exe")) webbrowser.get('chrome').open(url)
I want the name of the user running the python file in the user part . Each user's desktop has the same exe file in the same folder. Single variable user part ex. C:\Users\user1, C:\Users\user2\ ...
Thanks for helping.
When user10 starts the python file, open the browser with portable chrome in the chrome folder on user10's desktop.