-Server and wyserver.wys issues

We have to make the server and folder location for updates a setting in our VB.net app. When we create an update every thing seems to work fine and it looks in the alternate server location provided to let us know we have the latest version, but when we rev the app and try the update it errors out looking for the original download site which is empty. we are manually coping the update files to the desired location, if we leave out the wyserver.wys file it continues to look in the alternate site but says it has the latest rev. If we include the wyserver.wys file in the update files it errors out and seems to be looking in the original download site. Please advise what we are doing wrong. I included our code. We hardcoded the new server and directory location for testing.

AutomaticUpdater.wyUpdateCommandline = "-server = file://R:/Test/TestDatabases/ABC/EFG/HIJ/Updates, file://R:/Test/TestDatabases/ABC/EFG/HIJ/Updates/wyserver.wys"

AutomaticUpdater.ForceCheckForUpdate()

AutomaticUpdater.wyUpdateCommandline = "-server = file://R:/Test/TestDatabases/ABC/EFG/HIJ/Updates, file://R:/Test/TestDatabases/ABC/EFG/HIJ/Updates/wyserver.wys"

Firstly, this is not a valid site. If you're using "file:///" it should look like this:

file:///R:/Test/TestDatabases/ABC/EFG/HIJ/Updates/wyserver.wys

Notice the triple slash. That is, "file:///" not "file://". Also, you must only specify one path to the server file and you must properly quote the server file:

au.wyUpdateCommandline = "-server=""file:///R:/Test/TestDatabases/ABC/EFG/HIJ/Updates/wyserver.wys"""

I made the above changes and the app recognized the latest version using the alternate server setting, but when we upload the first updates we get the following error.

New command line: "-server = 'file:///R:/Test/TestDatabases/ABC/EFG/HIJ/Updates/wyserver.wys'"

Error trying to save file: Error downloading "file:///C:/Temp/uas-mpda.1.0.3.6.to.1.0.3.7.wyu": Could not find file 'C:\Temp\uas-mpda.1.0.3.6.to.1.0.3.7.wyu'.

It seems to be reverting to the default download site. When ever we upload the new wyserver.wys it does not seem to work. Using the old wyserver.wys file it uses the server we pass in the command line but does not see the updates.

The client.wyc file contains the location to the *.wys file. The *.wys file contains the location to the *.wyu files.

So set the download site you want to use. Then rebuild wyUpdate and include that wyUpdate.exe and client.wyc file with your app. Then rebuild your updates and upload them to your server.

Then everything will work fine.

AH. The situation we have is that we may not know the server/update location when we build the updates, is there a way to pass that information along to the wys? The updates will reside in the same location as the server file that we are passing in the "-server" commandline for the AU. Our app has settings for the update location directory but we will not know what that is at different locations and it will surely change from location to location. Due to our security requirements we must send the updates to each location where they will be placed on local networks for users to update.

Thanks for all the help!

Trying to get this to redirect the server location and update location but having issues.

au.wyUpdateCommandline = "-server = "file:///R:/Test/TestDatabases/ABC/EFG/HIJ/Updates/wyserver.wys" -updatepath = "file:///R:/Test/TestDatabases/ABC/EFG/HIJ/Updates""

AutomaticUpdater.ForceCheckForUpdate

You're not properly quoting the commandline parameters. This line is completely broken -- I'd be shocked if it worked at all:

au.wyUpdateCommandline = "-server = "file:///R:/Test/TestDatabases/ABC/EFG/HIJ/Updates/wyserver.wys" -updatepath = "file:///R:/Test/TestDatabases/ABC/EFG/HIJ/Updates""

It should look something like this:

au.wyUpdateCommandline = "-server=""file:///R:/Test/TestDatabases/ABC/EFG/HIJ/Updates/wyserver.wys"" -updatepath=""file:///R:/Test/TestDatabases/ABC/EFG/HIJ/Updates"""

Here is the sub, I edited the command line per the quotes you mentioned. Using the watch I verified the value of variable strServer is:

"-server=""file:///R:/pda/Updates/wyserver.wys"" -updatepath=""file:///R:/pda/Updates"""

The server command is correctly redirecting and we get no errors whe the app is up to date, but as soon as we add an update we get the error below the sub I included. It appears the -updatepath value is not being passed.

Private Sub AutomaticUpdater_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AutomaticUpdater.Click, mnuCheckForUpdates.Click Dim strUpdate As String, strServer As String

On Error Resume Next

If Not AutomaticUpdater.ClosingForInstall Then AutomaticUpdater.Visible = True If gstrUpdateServer = "" Then AutomaticUpdater.Visible = False MsgBox("No update server specified.") Exit Sub End If If gstrUpdatePath <> "" Then strServer = "-server=""""" & gstrUpdateServer & """"" -updatepath=" & """""" & gstrUpdatePath & """""" Else strServer = "-server=""""" & gstrUpdateServer & """""" End If

AutomaticUpdater.wyUpdateCommandline = strServer AutomaticUpdater.ForceCheckForUpdate() End If End Sub

Error trying to save file: Error downloading "file:///C:/Temp/uas-m.1.0.3.7.to.1.0.3.8.wyu": Could not find file 'C:\Temp\uas-m.1.0.3.7.to.1.0.3.8.wyu'.

Error trying to save file: Error downloading "file:///C:/Temp/uas-m.1.0.3.7.to.1.0.3.8.wyu": Could not find file 'C:\Temp\uas-m.1.0.3.7.to.1.0.3.8.wyu'.

The error message is telling you exactly what is wrong: Could not find file.

As I've said before: copy and paste that URL into your browser. Do you get the same error? That's because the file doesn't exist there. Which means you either (a) didn't setup your download site correctly or (b) you didn't upload the files to the correct folder. Or (c) both.

That is, make sure the file actually exists in the "C:\Temp\uas-m.1.0.3.7.to.1.0.3.8.wyu" location.

I understand the files are not in the temp folder the idea is to redirect to the -updatepath=""file:///R:/pda/Updates"""location.

Are you using %updatepath% in the download site? Double click the client.wyc file to see if you actually do.

That was it!

Thanks

Great product!