Have you replace all instances of "wyUpdate" in wyUpdate? if so, then it sounds like wyUpdate is self-update and downloading a newer wyUpdate that didn't have your changes implemented. See: How to make a custom version of wyUpdate.
I am attempting to make my own custom update exe (using my application's icon and name instead of wyUpdate to prevent confusing our users).
I have gone through and attempted to replace the "wyUpdate is downloading" text and I set the application icon to be my icon. In debug mode, I see the initial "update information" screen and I click the update button. I then get a "downloading and installing" screen that has the correct icon and text. That screen quickly closes and I get another "downloading and installing" screen that has "wyUpdate is downloading" for the text and the standard client icon. It stops long enough at the "Extracting files" item in the list so I can clearly see this is not showing the desired text and icon.
I cannot seem to find where this text and icon are coming from. Can you please suggest where I can look for it?
Thanks for all your support!
Have you replace all instances of "wyUpdate" in wyUpdate? if so, then it sounds like wyUpdate is self-update and downloading a newer wyUpdate that didn't have your changes implemented. See: How to make a custom version of wyUpdate.
I initially did not do a blanket replacement to avoid some naming conflicts (when I do a golbal replace all I get exception errors). I tried to replace just the icons and text. I am running this in the debugger through VS and as far as I know it is not auto updating itself. And it is not just the text that is off - I also get the default icon in the upper left corner of the window instead of my icon.
I believe I followed the instructions in your tutorial, but it does not specifically address the actual code changes like this.
What form is used to display the "download and udpate" messages? I have tried to put breakpoints in frmMain.Updating.cs function InstallUpdates but it does not hit the breakpoints at all, so I have not been able to trap to see what components are putting up the incorrect text.
ClientLanguage.cs is where most of the text is.
When I put some breakpoints in that module I do stop there and see the text is correct, but then it does not stop there once it actually gets into the process. I do not understand why I get 2 "Downloading and Installing" windows - one that is correct and closes quickly followed by one that is not correct but seems to be doing the extracting of files. Why am I getting 2 windows?
Because wyUpdate is self-updating. See the link I posted above.
I hate to be one of "those" people, but I guess I am having a brain lapse. Now no updates are happening (not even a check).
Let me try to sum up what I have. First, I have my custom wyupdate that creates ABC_Update.exe. I have added that to my application install (instead of wyupdate.exe). I then went according to the instructions in your article (I think) and built a new wybuild project just for my custom wyupdate. I only put the ABC_Update.exe file in it and build the client, selfupdate.wys and update file. I placed these files onto my update server.
I then rebuilt my application client and update files. I see my ABC_Updates.wys file built with the update files. I put all these onto the server for updates. But now I get nothing (no udpate stuff) when I run my application. When I try to run my wyupdate file in the vs debugger I am still getting the second window (which you say is trying to update something - I assume the ABC_Update.exe file, but since it should be up to date I don't understand why it is trying to update).
Anyway, in my mind, I see that the selfupdate.wys file (and associated update files) are for ABC_Update.exe to update itself. Then my application should be using the ABC_Update.wys and ABC_Update.exe files to update the application.
Have I missed something? I don't understand what step I missed to cause my application to not be able to check for udpates at all...
I hate to be one of "those" people, but I guess I am having a brain lapse. Now no updates are happening (not even a check).
Are you getting an error, or are you getting "No updates found". Double click the client.wyc file. Do you have the correct sites listed? Does the version listed match the version of your app?
I don't get anything. The client files look fine - but that just made me realize something. In the wybuild for my custom wyupdate, I only put in the ABC_Update.exe file - nothing else. I now think that at least I need the client file perhaps? What other files need to be included?
I think I know what I am missing, but I am not sure how to correct it. My application worked when I had wyupdate.exe in my directory. But since I want to use my own, I put it there then deleted the wyupdate.exe. Once I deleted it, my application quit updating until I put it back. I am still using the automatic updater dll which I think may be looking for wyupdate.exe, correct? Do I need to update the dll to use my exe file? Or is there somewhere else in my application I specify my update exe instead of wyupdate.exe?
Use the "wyUpdateLocation" property of the AutomaticUpdater to point to your updater name.
Thanks! That was the piece I was missing.
So now it appears to be using my updater instead of wyupdate. However, this time when I ran the update I got a File in Use error that my udpate exe file was in use. Why did I get this? I had to cancel the update because of it. It also then give me an exception error.
One other question - I ran the update once more and it went farther this time but I got a failed error anyway. But the question is how do I prevent the Finish window from showing up? I have it set to Close under the wybuild->properties->wyupdate settings but it still shows up.
Why did I get this? I had to cancel the update because of it. It also then give me an exception error.
You're app was still running? Or you you're running your app from Visual Studio and you have the "hosting process" enabled in your project's properties.
One other question - I ran the update once more and it went farther this time but I got a failed error anyway. But the question is how do I prevent the Finish window from showing up?
I'm not sure what you mean. When an error happens wyUpdate relaunches your app and shows the error in the AutomaticUPdater.
I was running my app stand-alone (not in VS). I download the update and when it goes to install (after closing the application) it is trying to update my version of wyupdate and it seems like it is getting stuck where it can't update because it is trying to update itself (maybe?) The exception information I get after the File in Use dialog is:System.NullReferenceException: Object reference not set to an instance of an object. at wyUpdate.frmFilesInUse.btnCancel_Click(Object sender, EventArgs e) at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
I guess I must still have something wrong if it is trying to udpate itself while it is trying to update the application.
My other question is how do I truly not show the Finished window. I have the property set to close instead of showing it in wybuild, but it shows it anyway. If I run the application again after the first failed attempt it tries again, I get an UpdateFailed event, and somewhere in the process I see the Finished window pop up then go away on its own. I would like that to never show up and just have the udpate close.
I guess I must still have something wrong if it is trying to udpate itself while it is trying to update the application.
How are you getting this error? Is the "files in use" dialog showing? Does it crash on its own, or do you click something and it crashes? I need more information so we can fix this.
My other question is how do I truly not show the Finished window. I have the property set to close instead of showing it in wybuild, but it shows it anyway. If I run the application again after the first failed attempt it tries again, I get an UpdateFailed event, and somewhere in the process I see the Finished window pop up then go away on its own. I would like that to never show up and just have the udpate close.
Does your app relaunch with the error shown in the AutomaticUpdater? Is your question how to prevent the brief appearance of the error in wyUpdate before it re-launches your app?
How are you getting this error? Is the "files in use" dialog showing?
I get the error when the application is re-opened for the installation of the update. Yes, the files in use dialog is showing, indicating my version of wyupdate is in use while it seems to be updating it (not sure why it is trying to update it - I only have the one version of it).
As far as the question about the Finished window, yes, I do not want the brief appearance of it at all. The fewer items that pop up and go away the fewer "what was that" questions the user (and my boss) will ask. As I said, I have the property set for "Close and not show the finish window" for the wybuid project. Maybe I can remove this from my custom wyupdate? Or maybe there is another setting somewhere?
Also, right now I have the automatic udpater hidden, so I am not seeing errors there. I get the error, as I said, after the app is reopend for the install. The window is persistent and aborts the update - I actually get the wyupate window, the file in use window, then the exception error window. I must force the close which then aborts the udpate. When I open my application again, I have a message box in the UpdateFailed event which I am getting, which I think is preceded by some other update windows the last of which is the finished window. I cannot verify the windows and the order at the moment because somehow I broke either my application or my updater since the updates have quit working 🙁 Once I get it back I can give more info on what happens after the installation abort.
I am not sure if I am making progress or not. I am temporarily showing the autoupdater in my application's debug mode, and I now see the udpater saying it failed to check for udpates, but the wierd thing is the detail message is:Failed to create the automatic updater temp folder: Access to the path '7za.exe' is denied.
7za.exe is a file in my program's folder. I noticed that somehow the version of that file in my version 1.2 directory was set to read-only. So I corrected it then rebuilt and put the udpates on the server, but I am still getting the same error. Any ideas why I am all of a sudden getting this error?
Thanks for all the help - your software is great!
Clearing the cache got rid of my weird file error that was stopping any attempts to update or install.
So I am back to the issue of having my version of wyupdate want to update itself and getting the File in Use dialog.
Please let me know if I still need to provide more information.
You're getting a whole bunch of odd errors, and the further you go along the more errors you're getting.
Try just using our version of wyUpdate (and our self-update sites). And use our version of the AutomaticUpdater. Make sure you're using the latest version (2.6.18.4 of wyBuild, wyUpdate, and the AutomaticUpdater).
Do you get the errors with our versions. If you do, make a small test case and send it to me so I can reproduce it here. You can send it to wyatt@wyday.com.
I finally figured out my problem with my custom updater. I was including within my wybuild project (thinking it needed it since I was not using wyudpate). Once I removed it from my wybuild project, rebuilt my updates, then cleared the cache. Everything now appears to be working correctly.
Thanks for all the help and advice!