locked
.NET AutoUpdate for Software RRS feed

  • Question

  • I have an existing program that has an automatic software updater.  The software is a monitoring program and should always be running.

    Process:

    Check internet for newer version.

    If found, rename the running program to "appname2.exe"

    After renaming, download the new version.

    Computer is rebooted and at that time, the software silently deleted the appname2.exe

    I've tried this on Vista and found a problem.  The "silent delete" now prompts the user (admin level) if it's ok to delete the file.   For now, I've modified the software to work on vista by renaming the old program and placing it in a program directory sub folder. THe program is only 400 kb so I'm not worried about size - and updates are rare.

    This program is in VB.NET 2003 1.1 framework.

    Is there a way to make a silent updater that works in Vista?  If so, can I do it with vb.net 2003 or do I need to go to vb.net 2005?

     

     

     

    Friday, February 9, 2007 7:00 PM

All replies

  • Remember that under Vista even when you are logged in as an Administrator, you don’t really have admin rights until something requests it and the user grants the request.

    Chances are what happened was that the original file as installed with elevated credentials which means that the low rights the user normally has are not enough to modify or delete the old version.

    No matter what... so long as UAC is enabled you are going to have to elevate permissions at some point... be it to delete the file or change the ownership of the original file.

    Friday, February 9, 2007 7:14 PM
  • Thanks, that explains it exactly how I can understand it!

    What I don't understand is ..."won't programs like Norton and other fancy smancy programs have to deal with the same prompts?"

    Friday, February 9, 2007 7:42 PM
  • At first glance yes... any application that was installed with elevated permissions and that tries to update with standard rights is likely going to run into similar issues... Acrobat 7 Reader has this issue for me today in fact under Vista.

    I’m afraid though that off hand I know of no way around this other than putting up with UAC. I could be wrong though, I know of no mechanism.

    I should mention though that as annoying as UAC is... it is there for a reason and designed for cases like this. From where I sit, when a user installs an application, they are verifying to the system that they want to do it... such a one time permission should not allow the app to be surreptitiously updated later, perhaps against the users will.

    Friday, February 9, 2007 7:54 PM
  • I agree with your comments about UAC.

    I found this link about auto updating and it seems to indicate a means of doing close to what I want.

    I would not mind the UAC prompt if it was at the time of my update.  But because I don't want to stop the app - and the reboot is the perfect time to delete the "old" version then...it's only when the user reboots that they are prompted.  I didn't want the user to have to "remember/know" that they should click "ok." 

    I need to think about all this. 

     

     

    Friday, February 9, 2007 8:01 PM
  • Hi - CodeButcher:

    If the app is going to download updates etc, then it needs to execute
    in UAC elevation mode.

    Because, higher-privileges are required for the actions.

    You can also check out my UAC guide here .

    I hope the above helps...

    Have a nice day...

    Best regards,
    Fisnik



    Coder24.com
    • Proposed as answer by Fisnik Hasani Saturday, October 24, 2009 7:07 AM
    Sunday, October 11, 2009 6:09 PM
  • Hello CodeButcher:

    How are you? How is the situation on your side?
    Is this thread solved yet?

    Have a nice day...

    Best regards,
    Fisnik
    Coder24.com
    Wednesday, October 21, 2009 6:10 PM
  • Hello CodeButcher:

    How are you? How is the situation on your side?
    Is this thread solved yet?

    Have a nice day...

    Best regards,
    Fisnik
    Coder24.com
    Saturday, October 24, 2009 7:07 AM
  • Initially posted this two years ago and just caught your "new post."  I still have a bit to learn about UAC so I'm off to read your FAQ on UAC.  thanks so much or the link.
    Tuesday, October 27, 2009 1:38 PM
  • Hi CodeButcher:

    Thanks for reporting your situation!

    Feel free, and check it out, if you have any new questions
    regarding UAC just ask!

    Have a nice day...

    Best regards,
    Fisnik
    Coder24.com
    Tuesday, October 27, 2009 6:31 PM
  • Hi CodeButcher:

    How is the situation on your side?
    Is this thread solved or NOT?

    Please tell me!

    Have a nice day...

    Best regards,
    Fisnik
    Coder24.com
    Friday, November 13, 2009 7:32 PM
  • Hi again:

    How is the situation on your side?
    Is this thread solved?

    Please tell me!

    Have a nice day...

    Best regards,
    Fisnik
    Coder24.com
    Sunday, December 27, 2009 10:26 AM
  • Hi again:

    Is this thread solved or NOT?
    Please tell me!

    Have a nice day...

    Best regards,
    Fisnik

    Coder24.com
    Saturday, January 2, 2010 2:26 PM