SXGuy Posted November 30, 2007 Share Posted November 30, 2007 (edited) Im currently wrtiting an autoit script which checks the user's HardwareID amongst other things, for validation, in regards to whether the user has rights to install/run the application. But what i would like to know, if there is any way the application can terminate itself and delete its self if it doesnt match a user's HardwareID to the one the application is set to run on? So basically, the application checks the users HardwareID before it runs or installs, if theres not a match, sets a note to destroy itself before terminating? Edited November 30, 2007 by SXGuy Link to comment Share on other sites More sharing options...
schilbiz Posted November 30, 2007 Share Posted November 30, 2007 (edited) Straight from the FAQs page, this should help with the auto delete part of the script. Q12. How can I have the script delete itself? A1. The following code can delete a running script. WARNING: Make a copy of your script before calling this function!!! Func _SelfDelete($iDelay = 0) Local $sCmdFile FileDelete(@TempDir & "\scratch.bat") $sCmdFile = 'ping -n ' & $iDelay & '127.0.0.1 > nul' & @CRLF _ & ':loop' & @CRLF _ & 'del "' & @ScriptFullPath & '"' & @CRLF _ & 'if exist "' & @ScriptFullPath & '" goto loop' & @CRLF _ & 'del ' & @TempDir & '\scratch.bat' FileWrite(@TempDir & "\scratch.bat", $sCmdFile) Run(@TempDir & "\scratch.bat", @TempDir, @SW_HIDE) EndFunc Edit: spelling errors Edited November 30, 2007 by schilbiz Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 30, 2007 Share Posted November 30, 2007 Im currently wrtiting an autoit script which checks the user's HardwareID amongst other things, for validation, in regards to whether the user has rights to install/run the application.But what i would like to know, if there is any way the application can terminate itself and delete its self if it doesnt match a user's HardwareID to the one the application is set to run on?So basically, the application checks the users HardwareID before it runs or installs, if theres not a match, sets a note to destroy itself before terminating?...aaaaand if he runs it from a CD? Or a USB stick with a ReadOnly switch? What difference does deleting the executable make? Still, there are plenty of options to leave a command shell running a batch file that deletes the script or some such. Or you could leave a RunOnce task behind. Or you could put a RunOnce task in the scheduler, etc. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
weaponx Posted November 30, 2007 Share Posted November 30, 2007 (edited) Maybe you could write a script that will use the laser in the cd drive to burn through the disk, rendering it useless. Edited November 30, 2007 by weaponx Link to comment Share on other sites More sharing options...
AlmarM Posted November 30, 2007 Share Posted November 30, 2007 (edited) Maybe you could write a script that will use the laser in the cd drive to burn through the disk, rendering it useless.Hehe that would be a great idea Oh My, look what I got.What do you got?The new CD of Monkeys in Space.WOW!Come lets play it.*Putting it in*BZROEMWow dude.Some laser burned my CD.*Cries* Edited November 30, 2007 by AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 30, 2007 Share Posted November 30, 2007 (edited) Maybe you could write a script that will use the laser in the cd drive to burn through the disk, rendering it useless.Put it in the shark tank -- the one that has sharks with frick'n...Well, you get the idea. Edited November 30, 2007 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
SXGuy Posted November 30, 2007 Author Share Posted November 30, 2007 haha thanx for all your input guys, funny enough i found the same info just after i posted, and to think i actually searched before hand, d'oh! I think i will avoid using my ROM to burn a CD LOL. 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