import os
import shutil
def listdirectory():
global computername
computername = input("What is the computer name? ")
completepathlist = fr"\\{computername}\C$\Users"
return os.listdir(completepathlist)
def username():
global completepath
global usernameinput
usernameinput = input("What is the user name? ")
completepath = fr"\\{computername}\C$\Users\{username}\AppData\Local\Google"
def programrunningcheck():
password = input("What is your password? ")
command = "taskkill /s " + str(computername) + " /u " + str(usernameinput) + " /p " +password+ " /im chrome.exe"
print(command)
os.system(command)
def deletegoogleapp():
shutil.rmtree(completepath)
#Functions being called
print(listdirectory())
username()
programrunningcheck()
deletegoogleapp()
Everything works up until deletegoogleapp
function is called and receive a
\\DESKTOP-62A8SSM\C$\Users\"function username at 0x010C8B28\AppData\Local\Google
looks to be not passing the variable completepath
from another function to the googleapp
function.