Changing Update Location

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.

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.

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