tempman 0 Posted June 19, 2010 Well this is an example how app can delete itself during running dummy.au3 FileInstall("del.bat", "del.bat") Run("del.bat", "", @SW_HIDE) MsgBox(4096,"Task", "Just keeping task alive...") del.bat TASKKILL /IM "dummy.exe" PING 1.1.1.1 -n 5 -w 1000 >NUL del dummy.exe del del.bat exit I hope this could help someone. Share this post Link to post Share on other sites
martin 85 Posted June 20, 2010 Maybe this? Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Share this post Link to post Share on other sites
tommytx 0 Posted March 28, 2012 Hey that is really neat... but you should have warned me there is a 15 second delay between the time the program runs and the time it deletes itself... but it really works great... Thanks... Share this post Link to post Share on other sites
JLogan3o13 1,647 Posted April 2, 2012 I always preferred to wait until reboot to delete the file, letting Windows clean it up with other temp files. I usually use something like this: #include <APIConstants.au3> #include <WinAPIEx.au3> _WinAPI_MoveFileEx(@ScriptFullPath, "", $MOVE_FILE_DELAY_UNTIL_REBOOT) "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Share this post Link to post Share on other sites
trancexx 1,013 Posted April 3, 2012 I always preferred to wait until reboot to delete the file, letting Windows clean it up with other temp files. I usually use something like this: #include <APIConstants.au3> #include <WinAPIEx.au3> _WinAPI_MoveFileEx(@ScriptFullPath, "", $MOVE_FILE_DELAY_UNTIL_REBOOT) That method has several downsides, first one would be the need for administrator privileges. Second one is reboot itself - for example, I don't remember when I did that last time on my home PC. I think it was three, four months ago when I installed VS. Before that it was something like two months, when I got this machine and installed windows. ♡♡♡ . eMyvnE Share this post Link to post Share on other sites
UEZ 1,287 Posted April 3, 2012 That method has several downsides, first one would be the need for administrator privileges. Second one is reboot itself - for example, I don't remember when I did that last time on my home PC. I think it was three, four months ago when I installed VS. Before that it was something like two months, when I got this machine and installed windows.That means you give a shit about MS patches - tough...Br,UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Share this post Link to post Share on other sites
JLogan3o13 1,647 Posted April 4, 2012 That method has several downsides, first one would be the need for administrator privileges. Second one is reboot itself - for example, I don't remember when I did that last time on my home PC. I think it was three, four months ago when I installed VS. Before that it was something like two months, when I got this machine and installed windows.You make an excellent point, of course. For most of what I do for customers, I am delivering a package of software through a third party tool, such as SCCM, Altiris, etc. As it typically runs as SYSTEM, or at least under an administrative account, I didn't think about that limitation. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Share this post Link to post Share on other sites