I would like to add the directory path "C:\Program Files\Google\Chrome\Application" to the system environment variable using python script only.
As shown in the image below, I already have it added manually, but I would like to achieve this using python script.
I have tried using the code below but it does not work.
import os
new_path = "C:\Program Files\Google\Chrome\Application"
path = os.environ.get('PATH')
new_path_list = [new_path] + path.split(';')
os.environ['PATH'] = ';'.join(new_path_list)