I have a following code which adds a particular file to startup of windows
userName = getpass.getuser()
filePath = 'C:\Users\%s\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup' %userName
if os.path.exists(filePath):
if os.path.isfile(filePath + 'l.exe') == False:
try:
shutil.copy2(sys.argv[0], filePath + 'l.exe')
except:
pass
but this is not adding the file to start up .. I dont understand why .. can anyone plz help me..