Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Right ive make an updater for my App.

 

After updating using the updater, i try running the app from the shortcuts on the desktop created in an vs.net deploment project.

 

Every time I run it the windows installer pops up try to install somthing from the (.msi) setup file.

 

Anyone help as its really bugging me :(

 

Cheers

 

Andy

Code today gone tomorrow!
Posted

Right looking into it seams to be somthing abount Strong Names in the setup checking the integraty of the files changes give invalid integraty i.e. the setup starts again

 

When found out how to solve will post

 

Andy

Code today gone tomorrow!
Posted (edited)

right the problem only arises after this code

 

   Public Function SearchDirectories(ByVal objDirectoryInfo As System.IO.DirectoryInfo) As Boolean
       Dim bolReturn As Boolean = False
       For Each objDirectoryInfo In objDirectoryInfo.GetDirectories
           bolReturn = True
           If objDirectoryInfo.Exists = True And objDirectoryInfo.Name <> "System Volume Information" And objDirectoryInfo.Name <> "RECYCLER" Then
               If SearchDirectories(objDirectoryInfo) = False And SearchFiles(objDirectoryInfo) = False Then
               End If
           End If
       Next
       Return bolReturn
   End Function

   Public Function SearchFiles(ByVal objDirectoryInfo As System.IO.DirectoryInfo) As Boolean
       Dim objFileInfo As System.IO.FileInfo
       Dim bolReturn As Boolean = False
       For Each objFileInfo In objDirectoryInfo.GetFiles
           'bolReturn = True
           'If InStr(objFileInfo.Name, "_") > 0 Then
           'objFileInfo.CopyTo(Replace(objFileInfo.FullName, "_", ""), True)
           'objFileInfo.Delete()
           'End If
       Next
       Return bolReturn
   End Function

   Public Sub CheckDirectories()
       Dim objDirectoryInfo As System.IO.DirectoryInfo
       objDirectoryInfo = New System.IO.DirectoryInfo(Application.StartupPath)
       If objDirectoryInfo.Exists = True Then
           SearchFiles(objDirectoryInfo)
           SearchDirectories(objDirectoryInfo)
       Else
           MessageBox.Show("Your chosen directory is not existing!", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error)
       End If
   End Sub

 

Notice the copy, delete code used to rename the downloaded files from 'filename.exe_' to 'filename.exe' commented out that was my first thought but now i have no idea

 

Andy

 

This is getting rediculess now it happens at this point

 

       Try
           Application.DoEvents()
           Dim pUpdaterInfo As New ProcessStartInfo()
           pUpdaterInfo.FileName = Application.StartupPath & "\" & "downloadProgress.exe"
           Dim pUpdater As Process = Process.Start(pUpdaterInfo)
           pUpdater.WaitForInputIdle()
           pUpdater.WaitForExit()
           pUpdater.Close()
           Application.DoEvents()
           'CheckDirectories()
           Application.Exit()
       Catch
           MsgBox(Err.Description)
           Application.Exit()
       End Try

 

All the above is a stop gap between the Updater and the main program

 

So I can update both the program and the installer

Edited by a_jam_sandwich
Code today gone tomorrow!
Posted

This is rediculus delete the file and copy using above installer appears on next run of program.

 

Do it manually using delete and rename in widows no problem

 

andy ideas this is the last thing in project

Code today gone tomorrow!
Posted

right ive fixed it by not going though the folder as above instead creating a patch list and then copying and deleting specific files

 

Ill have the update for public realease soon very easy to use and customable

 

Andy

Code today gone tomorrow!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...