Azu Posted September 2, 2006 Share Posted September 2, 2006 (edited) I know that some files have ways to randomly rename themselves every time you run them, in attempts to get around things such as gameguard or warden. I am wandering how a file can do this? Whenever I try to rename a file that is running, it won't let me because it is in use. How can a make an AutoIt script do something like this? Is it even possible? Edit: Sorry, I didn't see the section I was in until I posted here, and now I can't delete my post, can somebody please move it to the support section? x_x Edited September 2, 2006 by Azu Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 2, 2006 Moderators Share Posted September 2, 2006 The filepath in the process list doesn't change just because you've renamed a running program. Procexp.exe rather than task manager easily shows you that. But to answer your question... FileMove() can do what your asking specifically. Going for my record on post count today ? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Valuater Posted September 2, 2006 Share Posted September 2, 2006 But to answer your question... FileMove() can do what your asking specifically.Going for my record on post count today ?FileMove while its Running???Record ????When do you get the next Star???8) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 2, 2006 Moderators Share Posted September 2, 2006 (edited) FileMove while its Running??? Record ???? When do you get the next Star??? 8)I hope your not being sarcastic If you are... He asked how to rename an .exe while it is running. If you want to test what I said: 1. Make a compiled autoit script on your desktop with a While / WEnd loop and name the .exe doodle.exe 2. Now run the .exe 3. It's running right?... Now use this:FileMove(@DesktopDir & '\Doodle.exe', @DesktopDir & '\Doodle2.exe', 1)in another script and you will see that now your Doodle.exe is named Doodle2.exe. The above is only if you were being sarcastic... and as I said, even though it changes the executable name, it doens't change the original exectuable that is currently running. Edited September 2, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Valuater Posted September 2, 2006 Share Posted September 2, 2006 Actually no... I didn't know you could do that... thx ........... What is "the" or "your" record? When do you get your next star? 8) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 2, 2006 Moderators Share Posted September 2, 2006 (edited) Actually no... I didn't know you could do that... thx...........What is "the" or "your" record?When do you get your next star?8)I have no Idea on the actual number, I know there have been a few bored days in the upper 70's maybe 80's.Edit:I dont' know on the next star, if someone tells me... I'll make sure to stop posting 1 post before hand . Edited September 2, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Valuater Posted September 2, 2006 Share Posted September 2, 2006 6,250 8) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 2, 2006 Moderators Share Posted September 2, 2006 6,2508)I told my wife you would say whatever post number was next for me Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Azu Posted September 14, 2006 Author Share Posted September 14, 2006 Hi, thanks, it works I changed it a little bit to make it randomizing, and so it uses the au3 extension if it's not an exe.. $a=random(1,20,1) $b="" for $z=1 to $a $c=random(1,2,1) if $c=1 then $d=random(0,9,1) else $c=random(1,2,1) if $c=1 then $d=chr(random(asc("a"), Asc("z"), 1)) else $d=chr(random(asc("A"), Asc("Z"), 1)) endif endif $b=$b&$d next if @Compiled=1 then $b=$b&".exe" else $b=$b&".au3" endif filemove(@ScriptFullPath,@ScriptDir&"\"&$b,1) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 14, 2006 Moderators Share Posted September 14, 2006 You should set your scripts to auto tidy. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
czardas Posted September 14, 2006 Share Posted September 14, 2006 Why don't you rename your post whilst somebody is reading it. I tried to rename a post of my own earlier on and couldn't. Still its a funny 'renaming' moment right now. As you can see, it seems to be catching. operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
Azu Posted September 17, 2006 Author Share Posted September 17, 2006 Why was this moved to the GUI section lol.. Link to comment Share on other sites More sharing options...
GaryFrost Posted September 17, 2006 Share Posted September 17, 2006 I told my wife you would say whatever post number was next for me I think your maxed out on those, probably start taking them away next SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now