Making self-deleting program

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
alemrantareq
Posts: 203
Joined: Wed Jul 23, 2008 8:46 am

Making self-deleting program

Post by alemrantareq » Sat Jun 19, 2010 6:43 pm

Hi everybody, I just want to know is it possible with rev to make a self-deleting program? I need it for uninstallation purpose. Replies are most appreciated :lol:

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Making self-deleting program

Post by Mark » Sun Jun 20, 2010 3:49 pm

alemrantareq,

This is not really possible, but you can copy a minimal standalone application to a temporary directory and have that application delete all the other files. This is what the uninstaller of the Installer Maker plugin does.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

alemrantareq
Posts: 203
Joined: Wed Jul 23, 2008 8:46 am

Re: Making self-deleting program

Post by alemrantareq » Sun Jun 20, 2010 5:49 pm

It can be possible by creating a batch file. To do this, at first a batch file have to be opened and then write the following -

Code: Select all

PING 1.1.1.1 -n 3 -w 60000 >NUL
del (name of rev app)
del (batch file name)
Close the batch file and close your rev app. "on CloseStack" have to be used to launch the batch file. The batch file will now wait for 3 secs and then will delete the rev app as well as it'll delete itself. I prefer to give it a waiting time so that the rev app can get enough time to be closed.

Note: To change the waiting time, you have to replace "3" with your desired waiting secs after "-n".


Thanks Mark for replying, but the plug-in needs registration. :?

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Making self-deleting program

Post by Mark » Sun Jun 20, 2010 5:55 pm

Hi alemrantareq,

Yes, you can do this with a batch file, but I'm not sure that it will work on all versions of Windows and obviously it is a windows-only solution (I didn't know you need it for Windows).

The Installer Maker plugin isn't free.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

alemrantareq
Posts: 203
Joined: Wed Jul 23, 2008 8:46 am

Re: Making self-deleting program

Post by alemrantareq » Sun Jun 20, 2010 6:03 pm

Mark wrote:Hi alemrantareq,

Yes, you can do this with a batch file, but I'm not sure that it will work on all versions of Windows and obviously it is a windows-only solution (I didn't know you need it for Windows).

The Installer Maker plugin isn't free.

Best,

Mark
Yes, I use Windows XP & I made my app only for XP purpose. So I think its good for me :lol:
 

Post Reply