|
-
Dec 25th, 2008, 11:24 PM
#1
Thread Starter
Fanatic Member
[RESOLVED] [2005] Self Reference File Name Command?
In this program that I'm making, it renames itself to a random string of like 8 characters every time it runs. Previusly I've been using a registry key to keep the new name that it was named to in order to know what file to rename to change it next time.
What I wanted to know is if there is a sort of "Self Reference" Command for renaming or just getting the name of the file. Now I'm not talking about Me. with forms and stuff, this is about the .exe name. I've looked and looked and haven't come up with anything, does anyone know a command/function to get the name of the program while it's running itself?
-
Dec 26th, 2008, 03:24 AM
#2
Re: [2005] Self Reference File Name Command?
IO.Path.GetFileName(Application.ExecutablePath)
-
Dec 26th, 2008, 03:53 AM
#3
Re: [2005] Self Reference File Name Command?
OK.... I'll ask...
In this program that I'm making, it renames itself to a random string of like 8 characters every time it runs.
WHY on Earth would you want to do that? Last time I built something that did that, was some 20 years ago for starters, was when I was tinkering with making viruses for experimental purposes.....
-tg
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|