Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8562927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:50:28+00:00 2026-06-11T16:50:28+00:00

This is a winforms vb.net application. Because of some limitations I am not able

  • 0

This is a winforms vb.net application. Because of some limitations I am not able to use the built in clickOnce updating available in VS. So to handle updates for my application i have wrote an update app. which downloads an email attachment and processes it. All works great up to and including deleting the old files from the applications install folder and then moving the updated files to that folder.

But the new files seem to not have any effect on the application at all. Just for testing I placed a MessageBox.Show in the applications Form Load event.. The app shows the messagebox in VS when I debug. As well as when I run the app from the bin folder.. When my updater app does the copying the files are there but no dice nothing is changed and no message box shows when the app loads. Further investigating the problem I manually deleted the files that are to be replaced in the application folder and then unzipped the contents of the update zip file to that folder.. Started App and now a message box shows.. If I copy the files for the app directly from the bin folder to the app folder it shows as well.

This leads me to believe that there is something going on behind the scene in the below function that I am not catching. Any ideas why this is failing???

     Function ApplyUpdates(ByVal c As Integer, ByVal e As List(Of MessagePart))
    Dim xxxxState As Boolean = False
    Dim _path As String = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)) + "\XXXX\UpdateFiles\"
    Dim d As Integer = 20

    xxxxState = isProcessRunning("xxxx")
    If xxxxState = True Then
        KillxxxxTask()
    End If

    For Each _S In System.IO.Directory.GetFiles(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)) + "XXXX\UpdateFiles")
        System.IO.File.Delete(_S)
    Next


    For Each att In e
        Dim y As Boolean = UnZip(att.FileName)
    Next

    For Each f In System.IO.Directory.GetFiles(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)) + "\XXXX\UpdateFiles")
        Dim y As String = Path.GetExtension(f)
        Dim _fNM As String = Path.GetFileNameWithoutExtension(f)
        If y.Contains("ex0") Then
            My.Computer.FileSystem.RenameFile(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)) + "\XXXX\UpdateFiles" + "\" + _fNM + y, _fNM + "." + "exe")
            f = f.Replace("ex0", "exe")
        End If
        If y.Contains("dl0") Then
            My.Computer.FileSystem.RenameFile(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)) + "\XXXX\UpdateFiles" + "\" + _fNM + y, _fNM + "." + "dll")
            f = f.Replace("dl0", "dll")
        End If
        updating(d, "Copying File : " + f)
        d += 10
        Dim fName As String = Path.GetFileName(f)
    Next

        For Each S In System.IO.Directory.GetFiles(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)) + "\XXXX\UpdateFiles")
            Dim _ofile As String = Path.GetFileName(S)
            If File.Exists("C:\XXXX\" + _ofile) Then
                File.Delete("C:\XXXX\" + _ofile)
            End If
            '  File.Copy(S, "C:\XXXX\" + _ofile, True)

        Next
        For Each S In System.IO.Directory.GetFiles(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)) + "\XXXX\UpdateFiles")
            Dim _ofile As String = Path.GetFileName(S)
            File.Move(S, "C:\XXXX\" + _ofile)

        Next
        updating(100, "Update Completed")

    Return Nothing
End Function
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T16:50:29+00:00Added an answer on June 11, 2026 at 4:50 pm

    This sounds an awful lot like Windows File virtualization.

    Search for the file in C:\Documents and Settings\<userName>\Application Data and subfolders, I suspect you’ll find them in there.

    Windows does this to protect your program from itself if you don’t include an app.manifest in your project. Windows will assume your application is an old, legacy application that is not UAC aware unless it has an app.manifest. To prevent your application from crashing from denied file access, it allows the file operation to be performed, but instead secretly maps the file operation to a safe, local folder.

    Just add an app.Manifest: Project Add -> New Item -> Application Manifest File

    That should do it. You may find that you need to request an elevated permission, but the details are all in the app.manifest file.

    For details on File Virtualization, have a look at this explanation. It’s a big article, but if you Ctrl-Find ‘Virtualization process’ it will take you to the relevant section.

    See This MSDN article for more details on the app.manifest.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a .NET Winforms web browser control that is rendering some application information,
there's a WinForms-application written in C# using .NET Framework 3.5. This application uses a
For a WinForms VB.Net application, I use the Bindingsource's filtering capacity to filter data,
I'm having some problems integrating MS MapPoint 2009 into my WinForms .Net 2.0 application
In winforms application/asp.net sqlite works if i reference sqlite.dll. But when i try this
Is this possible? We have WinForms (CF) apps which use the EMDK, and would
I am facing some questions when trying to design an S3 application using ASP.NET
I am developing a winforms application using .NET 2.0 and Sql Server 2005. I
I have a VB.NET WinForms application. I am drawing a bunch of shapes on
I'm developing a .NET Windows Forms application. I use the model-view-presenter design pattern, supervising

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.