Reputation: 313
I am attempting to create a program that places a copy of itself into the windows start-up folder. if the program is being run from anywhere that isn't the start-up folder, I would like the program to add the users username to a text file where the original .exe is. hence I need a way to tell where the program is being run from. is there any inbuilt functions in the default units or will I have to write my own function? if so how would I accomplish this?
Upvotes: 0
Views: 190
Reputation: 34899
ParamStr(0)
will get you the full path and application name.
Disclaimer: This could be invalid for some OS implementations.
Upvotes: 1