Results 1 to 36 of 36

Thread: Delete after Restart [Resolved]

  1. #1

    Thread Starter
    Frenzied Member Ideas Man's Avatar
    Join Date
    Aug 2002
    Location
    Australia
    Posts
    1,718

    Delete after Restart [Resolved]

    You konw how some after the uninstallation of programs if the files are locked, it says:

    Would you like to delete these files after the system is rebooted?
    well, how do you do that?
    Last edited by Ideas Man; Dec 23rd, 2003 at 08:01 AM.
    I use Microsoft Visual Basic 2005. (Therefore, most code samples I provide will be based around the .NET Framework v2.0, unless otherwise specified)

  2. #2
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    Never had any programs say that to me. If it did, I would say no and manually delete them myself.

    Just display a message box asking the user, if they say yes create a batch file or another program and set it to run when the system restarts. It runs and then cleans itself.

  3. #3

    Thread Starter
    Frenzied Member Ideas Man's Avatar
    Join Date
    Aug 2002
    Location
    Australia
    Posts
    1,718
    mm, have to look for it, cause you never see anything popup when the system reboots, so it's strange, and very useful.
    I use Microsoft Visual Basic 2005. (Therefore, most code samples I provide will be based around the .NET Framework v2.0, unless otherwise specified)

  4. #4
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    Originally posted by Ideas Man
    mm, have to look for it, cause you never see anything popup when the system reboots, so it's strange, and very useful.
    "very useful"? My ass, it is NEVER needed unless it is modifying an important system file, and only Microsoft or the group behind the Linux distro or Apple should be doing so.

  5. #5

    Thread Starter
    Frenzied Member Ideas Man's Avatar
    Join Date
    Aug 2002
    Location
    Australia
    Posts
    1,718
    I was referring to the delete after reboot thing, calm down!
    I use Microsoft Visual Basic 2005. (Therefore, most code samples I provide will be based around the .NET Framework v2.0, unless otherwise specified)

  6. #6
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    Originally posted by Ideas Man
    I was referring to the delete after reboot thing, calm down!
    Which is what I was refering to......

  7. #7
    Hyperactive Member IntelSucks's Avatar
    Join Date
    Oct 2003
    Location
    Ubuntu Lovers Club
    Posts
    453
    useful?, thats stupid...Intel user...meh...

  8. #8
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877

    Re: Delete after Restart

    Originally posted by Ideas Man
    You konw how some after the uninstallation of programs if the files are locked, it says:



    well, how do you do that?
    I think it uses the registry Key "RunOnce" (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce).

    If you want a command to be executed once rather then running every time systems run, you just add a key to the above registry.

    I assume you could probably do something like,

    cmd.exe del myfile.exe

    or something similar. Havent tried it though.
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  9. #9

    Thread Starter
    Frenzied Member Ideas Man's Avatar
    Join Date
    Aug 2002
    Location
    Australia
    Posts
    1,718
    Originally posted by IntelSucks
    useful?, thats stupid...Intel user...meh...
    You obviously don't use a computer for much do you?

    Thanks Danial, will try that too.
    I use Microsoft Visual Basic 2005. (Therefore, most code samples I provide will be based around the .NET Framework v2.0, unless otherwise specified)

  10. #10
    Hyperactive Member IntelSucks's Avatar
    Join Date
    Oct 2003
    Location
    Ubuntu Lovers Club
    Posts
    453
    You dont know anything. Its you who doesn't use your computer for much if you use intel. Using Intel is like bending over with your with your trowsers down and trying to avoid getting screwed.

    Ideas man is officially the g4yest user on this forum.
    Last edited by IntelSucks; Dec 22nd, 2003 at 01:39 PM.

  11. #11
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Originally posted by kasracer
    "very useful"? My ass, it is NEVER needed unless it is modifying an important system file, and only Microsoft or the group behind the Linux distro or Apple should be doing so.
    It is sometime useful in the case where you have a process running and cant kill it in order to delete it.

    Also if you write your own custom uninstaller which uninstalls files, you need to use similar method to delete the main un-installer as it cant delete itself while its running.
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  12. #12

    Thread Starter
    Frenzied Member Ideas Man's Avatar
    Join Date
    Aug 2002
    Location
    Australia
    Posts
    1,718
    IntelSucks, F**k off! This topic is not for you, you never contribute anything useful, piss off. Youy are the gayest user in this forum, you contribute nothing to help others and only critisise good ideas by other people or tell other people they suck, go away!!!!!!!!!!!!!!!
    I use Microsoft Visual Basic 2005. (Therefore, most code samples I provide will be based around the .NET Framework v2.0, unless otherwise specified)

  13. #13

    Thread Starter
    Frenzied Member Ideas Man's Avatar
    Join Date
    Aug 2002
    Location
    Australia
    Posts
    1,718
    Like Danial said, see there are great benifits to what i'm asking.
    I use Microsoft Visual Basic 2005. (Therefore, most code samples I provide will be based around the .NET Framework v2.0, unless otherwise specified)

  14. #14
    Hyperactive Member IntelSucks's Avatar
    Join Date
    Oct 2003
    Location
    Ubuntu Lovers Club
    Posts
    453
    Thats not true I do contribute good things to this forum...I just dont like you anymore.

  15. #15
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    Originally posted by Danial
    It is sometime useful in the case where you have a process running and cant kill it in order to delete it.

    Also if you write your own custom uninstaller which uninstalls files, you need to use similar method to delete the main un-installer as it cant delete itself while its running.
    I still see no point in using a "delete after restart" method.

    You kill the process. There are ways to kill it. If the user is trying to uninstall something he/she keeps running, then they don't need it uninstalled.

    A custom installer can delete itself, it is quite easy to do. Take advantage of the OS' scripting. Linux, a simple BASH script could take care of the installer. In Windows, a BAT file could take care of it. Hell VBA could as well.

    In all seriousness though, I really REALLY REALLY despise/hate/loath any program that does the "delete after restart" bull****.

  16. #16
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Originally posted by kasracer
    I still see no point in using a "delete after restart" method.

    You kill the process. There are ways to kill it. If the user is trying to uninstall something he/she keeps running, then they don't need it uninstalled.
    Yes i know there are many wasy of Killing process throu API's but sometime a process can not be terminated so the only way is to try to delete it when the user reboots next.

    I peronally hate when i uninstall program and they leave files on my system and does not clean up leaving registry entries and other files.

    I dont think you understand what i am trying to say, when the user initiates an un-installation the uninstallation(custom un-installer) program is fired, and only way to delete that laste remaining .exe is after next reboot.

    A custom installer can delete itself, it is quite easy to do. Take advantage of the OS' scripting.
    Can you please tell me how an exe can delete itself while running? Through OS' Scripting or any other way.

    Linux, a simple BASH script could take care of the installer. In Windows, a BAT file could take care of it. Hell VBA could as well.
    Linux deleting windows file? BAT (i think you meant batch) file deleting an exe while running? VBA? WTH hell are you talking about? All of them would need a restart. How would you run Linux (bashh script) while in windows?


    In all seriousness though, I really REALLY REALLY despise/hate/loath any program that does the "delete after restart" bull****.
    I totally agree if a program forces user to restart when installed/uninstalled. But what we are talking about is "Cleaning Up" un-necessery files which is only carried out whenever the users boots up next. I have no problem with that infact if you run a registry monitoring software you will notice how many application uses the method i described in my first post, and it is totally transparent to the user.
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  17. #17

    Thread Starter
    Frenzied Member Ideas Man's Avatar
    Join Date
    Aug 2002
    Location
    Australia
    Posts
    1,718
    Can you please tell me how an exe can delete itself while running? Through OS' Scripting or any other way.
    I'm pretty sure than an .exe cannot delete itself, but i know a batch file can delete itself, that might be what he was referring to.

    Linux, a simple BASH script could take care of the installer. In Windows, a BAT file could take care of it. Hell VBA could as well.
    The first part to this i think he is referring how to do it in Linux as an example then he moves onto how to do it in Windows.
    I use Microsoft Visual Basic 2005. (Therefore, most code samples I provide will be based around the .NET Framework v2.0, unless otherwise specified)

  18. #18
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    Originally posted by Danial
    Yes i know there are many wasy of Killing process throu API's but sometime a process can not be terminated so the only way is to try to delete it when the user reboots next.
    If the ONLY way to stop a process in an application you made is for the user to restart, then you got problems in your programming.
    Originally posted by Danial
    I peronally hate when i uninstall program and they leave files on my system and does not clean up leaving registry entries and other files.
    Okay.........
    Originally posted by Danial
    I dont think you understand what i am trying to say, when the user initiates an un-installation the uninstallation(custom un-installer) program is fired, and only way to delete that laste remaining .exe is after next reboot.
    I do understand what you're trying to say. A simple batch file would take care of it. Reboots are totally unneccessary.
    Originally posted by Danial
    Can you please tell me how an exe can delete itself while running? Through OS' Scripting or any other way.
    run the batch file and immediately close the uninstaller. Let the batch file delete everything. Hell, using a batch file as the uninstaller for the uninstaller would make life a billion times easier.
    Originally posted by Danial
    Linux deleting windows file? BAT (i think you meant batch) file deleting an exe while running? VBA? WTH hell are you talking about? All of them would need a restart. How would you run Linux (bashh script) while in windows?
    Where do I say Linux deletes a Windows file? You don't run Linux scripts in Windows, I was giving you an example about how it would be done in Linux. Not everything revolves around Windows. VBA and/or a batch file could easily do what you want and they DO NOT require a damn restart.
    Originally posted by Danial
    But what we are talking about is "Cleaning Up" un-necessery files which is only carried out whenever the users boots up next.
    Why must you carry it out on startup? That just doesn't make sense! It can all be done without a reboot.

  19. #19
    Fanatic Member
    Join Date
    Jul 2001
    Location
    London UK
    Posts
    671

  20. #20

    Thread Starter
    Frenzied Member Ideas Man's Avatar
    Join Date
    Aug 2002
    Location
    Australia
    Posts
    1,718
    Now look kasracer, your beginning to sound like IntelSucks, if you don't have anything to contribute to help the question asked, don't contribute. You are not helping in anyway at all except starting a fight.
    I use Microsoft Visual Basic 2005. (Therefore, most code samples I provide will be based around the .NET Framework v2.0, unless otherwise specified)

  21. #21
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    Originally posted by Ideas Man
    Now look kasracer, your beginning to sound like IntelSucks, if you don't have anything to contribute to help the question asked, don't contribute. You are not helping in anyway at all except starting a fight.
    No I have offered alternatives to what you want to do. There is absoultely no reason why anyone but the people at Micorosft, Linux, and Apple would need to do what you want to do.

    I sound nothing like 'IntelSucks'. I have yet to blatenly insult you for no reason and I don't spout out wrong answers.

    If you want to make software that forces me to restart just to delete some files, please tell me the name of the software so I can avoid it. I don't like restarting or shutting my computer down especially when it isn't needed.

  22. #22

    Thread Starter
    Frenzied Member Ideas Man's Avatar
    Join Date
    Aug 2002
    Location
    Australia
    Posts
    1,718
    Yeah, that's true, fair enough. Still, nothing wrong with contributing to the issue at hand. I konw that but somethings can't be done without a restart and it's unavoidable, like if you go into a folder and go back and delete it, it can't, so make a prog that does it on next reboot so i don't have to worry about it, there are other uses for it.
    I use Microsoft Visual Basic 2005. (Therefore, most code samples I provide will be based around the .NET Framework v2.0, unless otherwise specified)

  23. #23
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Originally posted by kasracer
    No I have offered alternatives to what you want to do. There is absoultely no reason why anyone but the people at Micorosft, Linux, and Apple would need to do what you want to do.

    I sound nothing like 'IntelSucks'. I have yet to blatenly insult you for no reason and I don't spout out wrong answers.

    If you want to make software that forces me to restart just to delete some files, please tell me the name of the software so I can avoid it. I don't like restarting or shutting my computer down especially when it isn't needed.
    I am not gonna carry on this pointless argument. The fact is that there is more then one way of doing it. You might not like certain technique, which is fair enough.

    If you read my posts i have indicated that i myself dont like having to restart after installation/uninstallatioin. In some cases it could be used to clean up files/entries that could not be removed, at the next reboot. Even though we dont like it, a large number of program forces you to restart after installinga/uninstallation.

    Anyhow it seems like Ideas Man is satisfied with the solution/suggestion i have provided, so there is no point of arguing about who is right and who is wrong.
    We can carry on like that pointlessly forever...
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  24. #24
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    Originally posted by Ideas Man
    Yeah, that's true, fair enough. Still, nothing wrong with contributing to the issue at hand. I konw that but somethings can't be done without a restart and it's unavoidable
    That is true, however, ONLY for the Operating System creators. Updating something like very important like the file manager in Windows would need a restart since Windows doesn't run correctly without it and it can't be updated as it is being used.

    I think it is always avoidable for 3rd party software companies/groups.
    Originally posted by Ideas Man
    like if you go into a folder and go back and delete it, it can't, so make a prog that does it on next reboot so i don't have to worry about it, there are other uses for it.
    When I go into a folder and then back I can delete it fine

  25. #25

    Thread Starter
    Frenzied Member Ideas Man's Avatar
    Join Date
    Aug 2002
    Location
    Australia
    Posts
    1,718
    Yeah, so thanks for your help guys.
    I use Microsoft Visual Basic 2005. (Therefore, most code samples I provide will be based around the .NET Framework v2.0, unless otherwise specified)

  26. #26
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    Originally posted by Danial
    In some cases it could be used to clean up files/entries that could not be removed, at the next reboot.
    Like I said though, there is no reason why they CAN'T be removed.
    Originally posted by Danial
    Even though we dont like it, a large number of program forces you to restart after installinga/uninstallation.
    I don't use any of those programs. Seriously, no program on my computer has forced me to restart to install and/or uninstall it.
    Originally posted by Danial

    We can carry on like that pointlessly forever...
    Sounds like fun!

  27. #27
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Originally posted by kasracer
    Sounds like fun!
    Well if you wanna discuss it without insulting each other then I have no problem.

    Well, may be you have not come across it, that dosent mean it doesent occur. I have had many times where COM object can not be unloaded from memory, as they r some how referenced by some application, as you dont know which application has referenced it. Only option you have is to delete it at the next restart. EXEs are easy to handle but dll,ocx can sometime become very tricky to remove, thus might need a restart once in a while.

    Take things easy ..

    Danial
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  28. #28
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    Originally posted by Danial
    Well if you wanna discuss it without insulting each other then I have no problem.
    I haven't insulted anyone.......yet
    Originally posted by Danial
    Well, may be you have not come across it, that dosent mean it doesent occur. I have had many times where COM object can not be unloaded from memory, as they r some how referenced by some application, as you dont know which application has referenced it. Only option you have is to delete it at the next restart. EXEs are easy to handle but dll,ocx can sometime become very tricky to remove, thus might need a restart once in a while.
    Why would your COM object be referenced by another program? If another program still needs it, don't remove it.

    As a programmer, you should have full control of your application. This means the DLLS, COMs, EXE, ect. Some random application shouldn't be referencing or acessing any of them. Now if you put ANY of the files in the system folder, well that would/could cause problems with other programs accessing them. Don't do it.

    Not to be rude or anything, but I haven't seen any examples or explinations by any of you that could justify making me restart my computer to remove a file. To me, this just seems like a way to help out with bad design. Reminds me of Garbage Collection, but that is another thread.

  29. #29
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Originally posted by kasracer
    I haven't insulted anyone.......yet
    Why would your COM object be referenced by another program? If another program still needs it, don't remove it.

    As a programmer, you should have full control of your application. This means the DLLS, COMs, EXE, ect. Some random application shouldn't be referencing or acessing any of them. Now if you put ANY of the files in the system folder, well that would/could cause problems with other programs accessing them. Don't do it.
    Well the idea of using COM is that multiple application can share same components. If you need to update it then reboot in this case is necessary.

    IReminds me of Garbage Collection, but that is another thread.
    Well Garbage collection in .net is not a bad addition even though. But i would have preferred if were able to initiate garbage collection manually.
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  30. #30
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    Originally posted by Danial
    Well the idea of using COM is that multiple application can share same components. If you need to update it then reboot in this case is necessary.
    Simply make sure the applications are not using it. If it is your COM, then you will know what is using it and take appropriate action.
    Originally posted by Danial

    Well Garbage collection in .net is not a bad addition even though. But i would have preferred if were able to initiate garbage collection manually.
    But you can manually initiate garbage collection.

    You can call it. VB.NET also has support for constructurs/deconstructors so you can FORCE GC to clean up the object immediately when done, similarlly to RAII in C++ (but no where near as efficient)

  31. #31
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Originally posted by kasracer

    But you can manually initiate garbage collection.

    You can call it. VB.NET also has support for constructurs/deconstructors so you can FORCE GC to clean up the object immediately when done, similarlly to RAII in C++ (but no where near as efficient)
    Can you? I was not aware of that, i only started learning C#. I think i miss-interpreted it. Here is what MS book says about Grabage Collection:
    "The non-determnistic approach to memor reclamation seeks to maximize application performance and supplies a less-bug prone application environment.Thre is a cost however. Because of the mechanism by which garbage collection operates, you can not be certain when an object will be reclaimed. Thus you have no control over when a class's destructor(C#) or finalizer (VB.net) is executed."
    That made me think it cant be initiated manually.

    As i started with C++, i quite like the constructor/destructor in C#, but dont like the way done in vb.net (new, finalize). Well to be honest C# is too similar to Java/C++. But i am not complainig
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  32. #32
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    Originally posted by Danial
    Can you? I was not aware of that, i only started learning C#. I think i miss-interpreted it. Here is what MS book says about Grabage Collection:
    There is a function something like GarbageCollection.Clean() or something. I'll look for the thread I seen on it.

    There is also a method of using constructors and deconstructors in VB.NET in the same thread.

    However, without you manually doing it, GC will only collect when the amount of objects needing to be free reaches a certain point.

  33. #33

    Thread Starter
    Frenzied Member Ideas Man's Avatar
    Join Date
    Aug 2002
    Location
    Australia
    Posts
    1,718
    Woah, guys, hold up, maybe you should move this to the chit chat forum or PM each other or use messenger, this is starting to get off topic.
    I use Microsoft Visual Basic 2005. (Therefore, most code samples I provide will be based around the .NET Framework v2.0, unless otherwise specified)

  34. #34
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    Originally posted by Ideas Man
    Woah, guys, hold up, maybe you should move this to the chit chat forum or PM each other or use messenger, this is starting to get off topic.
    This is your fault, so in conclusion....... YOU MOVE IT!

  35. #35

    Thread Starter
    Frenzied Member Ideas Man's Avatar
    Join Date
    Aug 2002
    Location
    Australia
    Posts
    1,718
    No, this is not my fault, it is your fault, i finished the topic, you continued it be arguing, stop arguing and do something else.
    I use Microsoft Visual Basic 2005. (Therefore, most code samples I provide will be based around the .NET Framework v2.0, unless otherwise specified)

  36. #36
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    Originally posted by Ideas Man
    No, this is not my fault, it is your fault, i finished the topic, you continued it be arguing, stop arguing and do something else.
    and yet you keep replying....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width