How can I write os.getlogin
to open an app like zoom using the code given below
subprocess.Popen('C:\\Users\\srini\\AppData\\Roaming\\Zoom\\bin\\Zoom.exe')
I first tried this
subprocess.Popen('C:\\Users\\', os.getlogin, '\\AppData\\Roaming\\Zoom\\bin\\Zoom.exe')
The code is running but the app is not being opened by python I had imported subprocess and os
I tried this code too just to see that if it works
os.path.join(os.path.expandvars("%userprofile%"),"AppData", "Roaming", "Zoom", "bin", "Zoom.exe")
But it's still the same
Is there any way to open and app without writing the path or a way that makes this task easier?
I want to write this code for almost all apps on my laptop so are there any codes that can help me in the way mentioned in the above question
BTW I am a beginner and I know few codes, so plz help me understand this.