tempman Posted June 19, 2010 Share 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. Link to comment Share on other sites More sharing options...
martin Posted June 20, 2010 Share 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. Link to comment Share on other sites More sharing options...
tommytx Posted March 28, 2012 Share 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... Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted April 2, 2012 Moderators Share 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! Link to comment Share on other sites More sharing options...
trancexx Posted April 3, 2012 Share 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 Link to comment Share on other sites More sharing options...
UEZ Posted April 3, 2012 Share 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted April 4, 2012 Moderators Share 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! 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