Jump to content

Need Some Code


Recommended Posts

Not sure if someone has this so maybe all ask .

I need some code that will run a exe file three times then delete the exe .

Maybe write a ini file so it know how many times it has been used if ini file is delete it deletes the exe right then .

exe file what every you want to name it i can change mine to it .

Thanks if you have this or can code it for me .

Link to comment
Share on other sites

If you need to run the exe 3 times in a row...

Runwait("your.exe")
Runwait("your.exe")
Runwait("your.exe")
filedelete("your.exe")

That should do the trick.

<{POST_SNAPBACK}>

Well it may run on one day and maybe some other day again and so on so that would not work I don't think .
Link to comment
Share on other sites

Or it could be just A exe that runs three times then deletes it self that would work too . as I could wrap it with a program I have so all they would see it that exe file .

Link to comment
Share on other sites

Try this, using the registry

RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\YourKey", "count")
If @error = 1
RegWrite ( "HKEY_LOCAL_MACHINE\SOFTWARE\YourKey", "count" ,"REG_DWORD" , "0" )
endif

if RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\YourKey", "count")= 0 then
RunWait("your.exe")
RegWrite ( "HKEY_LOCAL_MACHINE\SOFTWARE\YourKey", "count" ,"REG_DWORD" , "1" )
exit
elseif RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\YourKey", "count")= 1 then
RunWait("your.exe")
RegWrite ( "HKEY_LOCAL_MACHINE\SOFTWARE\YourKey", "count" ,"REG_DWORD" , "2" )
exit
elseif RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\YourKey", "count")= 2 then
RunWait("your.exe")
RegDelete ( "HKEY_LOCAL_MACHINE\SOFTWARE\YourKey")
FileDelete("your.exe")
endif

Hope this is what you are after

CheersNobby

Link to comment
Share on other sites

If you're trying to ensure someone pays you for your code, you may want to do something slightly more elegant than using an integer counter in the registry or an ini file.

There's nothing like trying to outsmart the guy who wants $$$ to try to get people poking around defeating software protection. I would suggest when you build your exe (using all the nodecompile or password protection options) that you incorporate, in lieu of the integer counter, three unrelated random strings. Naming the keys something innocent helps too.

Then use a case or if/then/else structure to determine if one of the three passwords is present.

This will stop 70% of the people who dare muck in the registry. This is still defeatable by someone who makes a snapshot of the registry and diffs/stores a working value ----

then you're talking time bombs and how to you ensure that they haven't mucked w/ the system clock, etc. :ph34r:

Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...