bright, fresh software
Downloads  |  Buy

Changing Update Location

Changing Update Location

Postby pblawler » June 21st, 2012, 4:55 pm

I am trying to programatically change the location where updates are located on a local network, but cannot get it to work. We will have an application running on serveral customer networks where updates will be stored in various directory paths. As such we are providing an update location setting and want to pass that value to the Automatic updater. I have attached the three methods we have tried and the returned errors. Any help getting this working is greatly appreciated.

If Not AutomaticUpdater.ClosingForInstall Then
'strServer = "-updatepath = 'file://C:/TEMP/TestUpdate'"
strServer = "-Server = 'file://C:/TEMP/TestUpdate'"
AutomaticUpdater.wyUpdateCommandline = strServer
AutomaticUpdater.ForceCheckForUpdate()
End If

Error trying to save file: Error downloading "file://C:/TEMP/TestUpdate": Access to the path 'C:\TEMP\TestUpdate' is denied.

If Not AutomaticUpdater.ClosingForInstall Then
strServer = "-updatepath = 'file://C:/TEMP/TestUpdate'"
'strServer = "-Server = 'file://C:/TEMP/TestUpdate'"
AutomaticUpdater.wyUpdateCommandline = strServer
AutomaticUpdater.ForceCheckForUpdate()
End If

Error trying to save file: Error downloading "file://R:\Main\Databases\ABC\EFGHI\Updates\wyserver.wys": Could not find file 'R:\Main\Databases\ABC\EFGHI\Updates\wyserver.wys'.

If Not AutomaticUpdater.ClosingForInstall Then
strServer = "-Server = 'file://C:/TEMP/TestUpdate'"
strServer = strServer & " -updatepath = 'file://C:/TEMP/TestUpdate'"
AutomaticUpdater.wyUpdateCommandline = strServer
AutomaticUpdater.ForceCheckForUpdate()
End If

Error trying to save file: Error downloading "file://C:/TEMP/TestUpdate": Access to the path 'C:\TEMP\TestUpdate' is denied.
pblawler
 

Re: Changing Update Location

Postby Sam » June 21st, 2012, 8:35 pm

If Not AutomaticUpdater.ClosingForInstall Then
'strServer = "-updatepath = 'file://C:/TEMP/TestUpdate'"
strServer = "-Server = 'file://C:/TEMP/TestUpdate'"
AutomaticUpdater.wyUpdateCommandline = strServer
AutomaticUpdater.ForceCheckForUpdate()
End If

Error trying to save file: Error downloading "file://C:/TEMP/TestUpdate": Access to the path 'C:\TEMP\TestUpdate' is denied.


The "-server" location needs to reference the *.wys file. See: -server="<url>"



Error trying to save file: Error downloading "file://R:\Main\Databases\ABC\EFGHI\Updates\wyserver.wys": Could not find file 'R:\Main\Databases\ABC\EFGHI\Updates\wyserver.wys'.


The error is telling you exactly what the problem is. It couldn't find the file. Try copy/pasting that exact url in your bowser and you'll get the same error.
User avatar
Sam
 
Posts: 1986
Joined: March 8th, 2010, 3:01 am
Location: New Hampshire

Re: Changing Update Location

Postby pblawler » June 22nd, 2012, 8:51 am

No the file was there the whole time, I check several times because of the error text. I got it working with the code below using the exact same folder and files. The wys was there the whole time.

If Not AutomaticUpdater.ClosingForInstall Then
AutomaticUpdater.Visible = True
If gstrUpdatePath = "" Then Exit Sub
If gstrUpdateServer = "" Then Exit Sub
AutomaticUpdater.
strServer = "-server = file://C:/TEMP/TestUpdate, file://C:/TEMP/TestUpdate/wyserver.wys"
AutomaticUpdater.wyUpdateCommandline = strServer
AutomaticUpdater.ForceCheckForUpdate()
End If
pblawler
 


Return to wyBuild, wyUpdate, & AutomaticUpdater Support