So I changed the properties of the .exe for the program to run as an administrator, and that has fixed the issue.Thanks for your replies and the work you put into the program.