Hi people, my doubt is it: How I do to a file if "auto-start" with the "Windows" ?

I have this it done already:

aReg = ConnectRegistry(None,HKEY_LOCAL_MACHINE)
    aKey = OpenKey(aReg, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Run")
    aKey = OpenKey(aReg, r"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", 0, KEY_WRITE)
    SetValueEx(aKey,"name",0, REG_SZ, r"C:\name.extension")
    CloseKey(aKey)
    CloseKey(aReg)

Thank you patience :icon_wink:

Recommended Answers

Simple way to do this is to put the program or a shortcut to it here

C:\\Users\\*USERNAME*\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup

where *USERNAME* is your username

Jump to Post

All 2 Replies

Simple way to do this is to put the program or a shortcut to it here

C:\\Users\\*USERNAME*\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup

where *USERNAME* is your username

You don't go belive, it was right, I was writing the directory wrong ... xD

Thank you patience
Sorry my english

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.