OS Upgrade script - the network path was not found

Support forums for the Habitat Automate plugin
Post Reply
lblokland
Posts: 30
Joined: Wed Nov 17, 2021 1:29 pm

OS Upgrade script - the network path was not found

Post by lblokland »

While trying to setup an install-from-unc on a customers site I get the error message [ System error 53 has occurred. The network path was not found' in the script logs. ]
As far as I can see all the settings are correct (as other Habitat scripts work well) and I can access the share and file while logged on a workstation with the Local Network Share username+password.

However the script fails with the message as noted.

Can someone help me troubleshoot this?

Also, in the script logs the password of the account used is written down in plain text....can that be disabled?

Thanks!

User avatar
Cubert
Posts: 2078
Joined: Tue Dec 29, 2015 7:57 pm
6
Contact:

Re: OS Upgrade script - the network path was not found

Post by Cubert »

Can you post up some screen shots so we can see what your seeing? Where in the plugin are you and what control is beng used.

Habitat is pretty big so there is a lot of areas where some functions may reside.

lblokland
Posts: 30
Joined: Wed Nov 17, 2021 1:29 pm

Re: OS Upgrade script - the network path was not found

Post by lblokland »

Sure,
Not sure what change overnight, but now a file is being downloaded that was there for a long time except it's the wrong one...

I've attached images of the location setup:
image.png
image.png (7.24 KiB) Viewed 308 times
The Habitat - Upgrade assistent setup for the local image that has been placed in the SiteCache share.:
image2.png
image2.png (27.38 KiB) Viewed 308 times
Script is downloading file 21H2_64.ISO from the SiteCache to c:\temp\21H2.ISO, however it should download file 'Win11_EnglishInternational_x64v1' I placed there to the C:\temp and use that instead.
Should I fill in one of the fields to set the filename to make sure the W11 iso is being downloaded?

Also, is there a way to hide the passwords that are being used? They might be in logfiles etc...

Hope to hear soon!

User avatar
Cubert
Posts: 2078
Joined: Tue Dec 29, 2015 7:57 pm
6
Contact:

Re: OS Upgrade script - the network path was not found

Post by Cubert »

Actually from your setup shown I am surprised anything shows downloaded....


You say it should be downloading -> 'Win11_EnglishInternational_x64v1'

I don't see where did you tell it to do this? The areas where you tell the plugin the actual file names are blank. (see image)


Screenshot 2022-07-28 090700.png
Screenshot 2022-07-28 090700.png (36.02 KiB) Viewed 292 times


The plugin knows what file to apply by combining the Local network Share and the (32bit,64bit,Ent) iso file names to complete the URI needed to acquire the file. With out the file names it can not complete the download and would exit script logging that files didn't exist in agent script logs.


Here is some support documentation about the upgrade services.
viewtopic.php?t=5657

lblokland
Posts: 30
Joined: Wed Nov 17, 2021 1:29 pm

Re: OS Upgrade script - the network path was not found

Post by lblokland »

Hi,

Please see below, I have changed the settings but still the W10 image is applied....
Succesfully though, but the wrong image is downloaded.

In the script logs I can see the target image name in c:\temp (21H2.iso) but not the source that is being downloaded.

Any thoughts?
image.png
image.png (32.16 KiB) Viewed 229 times
Thanks!
Leon

User avatar
Cubert
Posts: 2078
Joined: Tue Dec 29, 2015 7:57 pm
6
Contact:

Re: OS Upgrade script - the network path was not found

Post by Cubert »

You should monitor the script logs to see what's going on and when. It should alert you to issues.
Screenshot 2022-08-03 091028.png
Screenshot 2022-08-03 091028.png (33.15 KiB) Viewed 207 times
Send me these logs that you get here.

lblokland
Posts: 30
Joined: Wed Nov 17, 2021 1:29 pm

Re: OS Upgrade script - the network path was not found

Post by lblokland »

Not sure if this helps:

The Script(5906) failed in the Then section at step 321. The reason:

Script: S5906 - Starting at Server Time: Wednesday, August 3, 2022 3:47:47 PM
IF F5 ValueOne (P1): CMD Comparer (P2): 2 ValueTwo (P3): INSTALLNOW T: 1.2456422
L1 F139 Note (P1): Test for Windows OS on agent T: 1.2456422
L3 F139 Note (P1): 'Test for Master Switch to be on, we do not execute if switch is off or setting does not ex...' T: 1.2456422
L4 F20 SetType(P1):11 Parameter(P2):'SELECT count(Value) FROM `plug...' VariableName(P3):MasterSwitch T: 1.2456422
L5 F70 Value (P1): MasterSwitch Comparer (P2): 2 To (P3): 0 Jump (P4): :MASTERSWITCHISOFF T: 1.2456422
L6 F139 Note (P1): See if we have a Policy ID passed to us T: 1.2456422
L7 F70 Value (P1): POLICY Comparer (P2): 2 To (P3): Jump (P4): :WINDOWS10POLICYMISSING T: 1.2456422
L8 F67 Sql (P1): UPDATE `plugin_p4a_habitat_windowsupgradepolicies` SET`LastUsed` = NOW() WHERE `ID` = '4'; T: 1.2456422
L9 F139 Note (P1): Get Windows current version on agent T: 1.2456422
L10 F20 SetType(P1):0 Parameter(P2):'HKEY_LOCAL_MACHINE\Software\Mi...' VariableName(P3):Win10Version T: 1.2456422
L11 F70 Value (P1): Win10Version Comparer (P2): 8 To (P3): -9999 Jump (P4): :MISSINGWIN10VERSION T: 5.2651247
L12 F70 Value (P1): Win10Version Comparer (P2): 1 To (P3): Jump (P4): :MISSINGWIN10VERSION T: 5.2661666
L13 F70 Value (P1): Win10Version Comparer (P2): 2 To (P3): Jump (P4): :MISSINGWIN10VERSION T: 5.2661666
L14 F139 Note (P1): Load Upgrade Policy from SQL T: 5.2661666
L15 F196 SQL (P1): SELECT * FROM plugin_p4a_habitat_windowsupgradepolicies WHERE ID = '4' T: 5.2661666
L16 F197 Variable (P1): sqldataset RowIndex (P2): 1 T: 5.2661666
L17 F20 SetType(P1):1 Parameter(P2):'SOLUTIONAL_Win11_21H2_English_...' VariableName(P3):PolicyName T: 5.2661666
L18 F20 SetType(P1):1 Parameter(P2): VariableName(P3):ISOWEBURL T: 5.2661666
L19 F20 SetType(P1):1 Parameter(P2):'Win11_EnglishInternational_x64...' VariableName(P3):ISO64BitFile T: 5.2661666
L20 F20 SetType(P1):1 Parameter(P2): VariableName(P3):ISO32BitFile T: 5.2661666
L21 F20 SetType(P1):1 Parameter(P2):'Win11_EnglishInternational_x64...' VariableName(P3):ISOENTFile T: 5.2661666
L22 F20 SetType(P1):1 Parameter(P2):21H2-11 VariableName(P3):ISOVersion T: 5.2661666
L23 F20 SetType(P1):1 Parameter(P2):@sqlCopyFileLocally@ VariableName(P3):CopyFileLocally T: 5.2661666
L24 F20 SetType(P1):1 Parameter(P2):0 VariableName(P3):UseGoogleAPIKey T: 5.2661666
L25 F20 SetType(P1):1 Parameter(P2):1 VariableName(P3):UseNetworkCache T: 5.2661666
L26 F20 SetType(P1):1 Parameter(P2):'\\sol-s01\SiteCache\WindowsISO...' VariableName(P3):NetworkCacheLocation T: 5.2661666
L27 F20 SetType(P1):1 Parameter(P2):SOLUTIONAL\sa_service VariableName(P3):NetworkUser T: 5.2661666
L28 F20 SetType(P1):1 Parameter(P2):kBOPkw5H3ApHssZS VariableName(P3):NetworkPwd T: 5.2661666
L29 F20 SetType(P1):1 Parameter(P2): VariableName(P3):UserImageURL T: 5.2661666
L30 F20 SetType(P1):1 Parameter(P2): VariableName(P3):UserMessage T: 5.2661666
L31 F20 SetType(P1):1 Parameter(P2):0 VariableName(P3):OverRideUserStopAction T: 5.2661666
L32 F20 SetType(P1):1 Parameter(P2):0 VariableName(P3):UseGoogleDrive T: 5.2661666
L33 F20 SetType(P1):1 Parameter(P2): VariableName(P3):GoogleDrive32BitFileID T: 5.2661666
L34 F20 SetType(P1):1 Parameter(P2): VariableName(P3):GoogleDrive64BitFileID T: 5.2661666
L35 F20 SetType(P1):1 Parameter(P2): VariableName(P3):GoogleDriveENTFileID T: 5.2661666
L36 F20 SetType(P1):1 Parameter(P2):0 VariableName(P3):MasterCacheAgent T: 5.2661666
L37 F20 SetType(P1):0 Parameter(P2):'HKEY_LOCAL_MACHINE\SOFTWARE\Mi...' VariableName(P3):WINEdition T: 5.2661666
L38 F29 Message (P1): Making sure we have working directories on agent. T: 15.3048037
L39 F160 Path (P1): %ltsvcdir%\Habitat\windows10UG\ T: 15.3048037
L40 F154 Folder (P1): %ltsvcdir%\Habitat\windows10UG\ T: 23.3315056
L41 F139 Note (P1): Test Policy ISO Version against Agent version T: 37.3813756
L42 F70 Value (P1): Win10Version Comparer (P2): 8 To (P3): Value not found Jump (P4): :PREPAIRFORISODOWNLOAD T: 37.3813756
L43 F29 Message (P1): Agents current OS version is -> 2009 - Policy version is -> 21H2-11 T: 37.3813756
L44 F70 Value (P1): Win10Version Comparer (P2): 7 To (P3): 21H2-11 Jump (P4): :WINDOWSUPTOVERSION T: 37.3813756
L45 F70 Value (P1): OverRideUserStopAction Comparer (P2): 2 To (P3): 1 Jump (P4): :GETUSERINPUT T: 37.3813756
L46 F139 Note (P1): Prepair for ISO file download T: 37.3813756
L47 F139 Note (P1): :PREPAIRFORISODOWNLOAD T: 37.3813756
L48 F29 Message (P1): Confirm we have enought working space on C:\ to complete upgrade. T: 37.3813756
L49 F235 T: 37.3813756
L50 F70 Value (P1): CDRIVESIZE Comparer (P2): 4 To (P3): 15 Jump (P4): :NOTENOUGHTDRIVESPACE T: 49.4290788
L51 F70 Value (P1): UseGoogleDrive Comparer (P2): 2 To (P3): 1 Jump (P4): :GOOGLEDRIVE T: 49.4290788
L52 F139 Note (P1): :WEBURL T: 49.4290788
L53 F29 Message (P1): We are using the Web URL to downlaod ISO file. T: 49.4290788
L54 F70 Value (P1): WINEdition Comparer (P2): 8 To (P3): Enterprise Jump (P4): :WEBURLENT T: 49.4290788
L56 F20 SetType(P1):1 Parameter(P2):'/Win11_EnglishInternational_x6...' VariableName(P3):ISODOWNLOADPATH T: 49.4290788
L57 F129 Jump (P1): :CONTINUETOINSTALL T: 49.4290788
L89 F139 Note (P1): :CONTINUETOINSTALL T: 49.4290788
L90 F70 Value (P1): ISODOWNLOADPATH Comparer (P2): 2 To (P3): Jump (P4): :MISSINGISOFILENAME T: 49.4290788
L91 F70 Value (P1): ISODOWNLOADPATH Comparer (P2): 2 To (P3): \ Jump (P4): :MISSINGISOFILENAME T: 49.4290788
L92 F29 Message (P1): The ISO Download path is set to [/Win11_EnglishInternational_x64v1.iso] T: 49.4290788
L93 F139 Note (P1): Do we check for Network Cache? T: 49.4290788
L94 F139 Note (P1): Download ISO and Extract to working directory T: 49.4290788
L95 F20 SetType(P1):1 Parameter(P2): VariableName(P3):ISOPATH T: 49.4290788
L96 F70 Value (P1): UseGoogleAPIKey Comparer (P2): 2 To (P3): 1 Jump (P4): :DOWNLOADUSINGGOOGLEAPIKEY T: 49.4290788
L97 F70 Value (P1): UseGoogleDrive Comparer (P2): 2 To (P3): 0 Jump (P4): :DOWNLOADUSINGGOOGLEAPIKEY T: 49.4290788
L166 F139 Note (P1): :DOWNLOADUSINGGOOGLEAPIKEY T: 49.4290788
L167 F70 Value (P1): UseNetworkCache Comparer (P2): 2 To (P3): 1 Jump (P4): :DOWNLOADTONETWORKCACHE T: 49.4290788
L182 F139 Note (P1): :DOWNLOADTONETWORKCACHE T: 49.4290788
L183 F29 Message (P1): Checking access to [\\sol-s01\SiteCache\WindowsISO\] for cached ISO T: 49.4290788
L184 F70 Value (P1): NetworkUser Comparer (P2): 2 To (P3): Jump (P4): :NONETWORKUSERACCOUNT T: 49.4290788
L185 F139 Note (P1): 'Make a call out to the network share to see if we can establish a connection with username...' T: 49.4290788
L186 F128 Command (P1): 'net use \\sol-s01\SiteCache\WindowsISO\ /user:SOLUTIONAL\sa_...' User (P2): SOLUTIONAL\sa_service T: 49.4290788
L187 F29 Message (P1): 'Testing Network access to [\\sol-s01\SiteCache\WindowsISO\] with [SOLUTIONAL\sa_service] [...' T: 53.448471
L188 F70 Value (P1): WINEdition Comparer (P2): 8 To (P3): Enterprise Jump (P4): :VERIFYNETCACHEENTSTEP0 T: 53.448471
L190 F20 SetType(P1):1 Parameter(P2):'\\sol-s01\SiteCache\WindowsISO...' VariableName(P3):ISOPATH T: 53.448471
L191 F129 Jump (P1): :VERIFYNETCACHEENTSTEP1 T: 53.448471
L194 F139 Note (P1): :VERIFYNETCACHEENTSTEP1 T: 53.448471
L195 F128 Command (P1): 'IF EXIST \\sol-s01\SiteCache\WindowsISO\\21H2-11_64.iso ECHO...' User (P2): SOLUTIONAL\sa_service T: 53.448471
L196 F20 SetType(P1):1 Parameter(P2):OK VariableName(P3):NetworkFileCached T: 59.476954
L197 F29 Message (P1): Checking for ISO file on the network [ OK ] T: 59.476954
L198 F70 Value (P1): NetworkFileCached Comparer (P2): 9 To (P3): Yes Jump (P4): :DOWNLOADISOTONETWORKCACHE T: 59.476954
L200 F139 Note (P1): :DOWNLOADISOTONETWORKCACHE T: 59.476954
L201 F29 Message (P1): 'ISO not in cache, downloading from URL [/Win11_EnglishInternational_x64v1.iso] to Network ...' T: 59.476954
L202 F20 SetType(P1):1 Parameter(P2):1 VariableName(P3):MasterCacheAgent T: 59.476954
L203 F70 Value (P1): WINEdition Comparer (P2): 8 To (P3): Enterprise Jump (P4): :VERIFYNETCACHEENTSTEP2 T: 59.476954
L205 F19 URL (P1): '/Win11_EnglishInternational_x6...' LocalFile (P2): '%ltsvcdir%\Habitat\Windows10UG...' Wait (P3): 0 T: 59.476954
L207 F168 Source (P1): '%ltsvcdir%\Habitat\Windows10UG...' Destination (P2): '\\sol-s01\SiteCache\WindowsISO...' User (P3): SOLUTIONAL\sa_service T: 69.5138368
L209 F20 SetType(P1):1 Parameter(P2):'%ltsvcdir%\Habitat\Windows10UG...' VariableName(P3):ISOPATH T: 73.5282397
L210 F129 Jump (P1): :VERIFYNETCACHEENTSTEP3 T: 73.5282397
L215 F139 Note (P1): :VERIFYNETCACHEENTSTEP3 T: 73.5282397
L216 F128 Command (P1): 'IF EXIST %ltsvcdir%\Habitat\Windows10UG\21H2-11_64.iso ECHO ...' User (P2): SOLUTIONAL\sa_service T: 73.5282397
L217 F20 SetType(P1):1 Parameter(P2):OK VariableName(P3):NetworkFileCached T: 81.5596933
L218 F29 Message (P1): Checking for ISO file on the network [ OK ] T: 81.5596933
L219 F70 Value (P1): NetworkFileCached Comparer (P2): 9 To (P3): Yes Jump (P4): :WINDOWS10CACHEFAILED T: 81.5607421
L339 F139 Note (P1): :WINDOWS10CACHEFAILED T: 81.5607421
L340 F29 Message (P1): 'The Windows 10 ISO failed to download the [%ltsvcdir%\Habitat\Windows10UG\21H2-11.iso]. Pl...' T: 81.5607421
L341 F67 Sql (P1): 'INSERT IGNORE INTO plugin_p4a_habitat_win10upgrades_agents (`ComputerID`,`AttemptLog`) Val...' T: 81.5607421
L342 F129 Jump (P1): :CONTINUEWINDOWSINSTALLERUSELOCALISO T: 81.5607421
L225 F139 Note (P1): :CONTINUEWINDOWSINSTALLERUSELOCALISO T: 81.5607421
L226 F20 SetType(P1):1 Parameter(P2):1 VariableName(P3):MasterCacheAgent T: 81.5607421
L227 F29 Message (P1): We have completed the ISO Download T: 81.5607421
L228 F129 Jump (P1): :CONTINUEWINDOWSINSTALLER T: 81.5607421
L234 F139 Note (P1): :CONTINUEWINDOWSINSTALLER T: 81.5607421
L235 F139 Note (P1): Write out some debug vars to the local agent T: 81.5607421
L236 F90 File (P1): %ltsvcdir%\Habitat\Windows10UG\vars.txt T: 81.5607421
L237 F29 Message (P1): Extracting the ISO to the agents local drive. T: 91.600435
L238 F154 Folder (P1): %ltsvcdir%\Habitat\windows10UG\ISO T: 91.600435
L239 F70 Value (P1): MasterCacheAgent Comparer (P2): 2 To (P3): 1 Jump (P4): :MOUNTLOCALISOFILE T: 95.6153514
L241 F139 Note (P1): :MOUNTLOCALISOFILE T: 95.6153514
L242 F29 Message (P1): ISO is local to agent, mounting local file. T: 95.6153514
L243 F139 Note (P1): Mount Windows 10 ISO T: 95.6153514
L244 F235 T: 95.6153514
L245 F102 String (P1): ' Mount-DiskImage : The system ...' Pattern (P2): ([^\r\n]*) Variable (P3): T: 105.6493581
L246 F20 SetType(P1):1 Parameter(P2):' Mount-DiskImage : The system ...' VariableName(P3):mountDriveLetter T: 105.6493581
L247 F29 Message (P1): 'Mounted ISO as Drive letter [ Mount-DiskImage : The system cannot find the file specifi...' T: 105.6493581
L248 F139 Note (P1): Unpack ISO to Patch Remedy Upgrade directory T: 105.6493581
L249 F16 Shell (P1): 'robocopy Mount-DiskImage : The system cannot find the file specified. :\ %ltsvcdir%\Habit...' T: 105.6493581
L250 F29 Message (P1): 'ROBOCOPY Returned -> [ -------------------------------------------------------------------...' T: 113.6867194
L251 F139 Note (P1): Unmount Windows 10 ISO T: 113.6867194
L252 F235 T: 113.6867194
L253 F29 Message (P1): 'Dismount Drive Returned -> [ -------------------------------------------------------------...' T: 119.7090468
L254 F129 Jump (P1): :LETSCHECKFORSETUPFILE T: 119.7090468
L280 F139 Note (P1): :LETSCHECKFORSETUPFILE T: 119.7090468
L281 F114 File (P1): '%ltsvcdir%\Habitat\windows10UG...' Check (P2): 1 Jump (P3): :WINDOWS10UGSETUPFILE T: 119.7090468
L317 F139 Note (P1): :WINDOWS10UGSETUPFILE T: 133.7623352
L318 F235 T: 133.7623352
L319 F67 Sql (P1): 'INSERT IGNORE INTO plugin_p4a_habitat_win10upgrades_agents (`ComputerID`,`AttemptLog`) Val...' T: 145.8087067
L320 F29 Message (P1): 'Stopping Script. The Setup.exe file was not available for execution. The downloads or netw...' T: 145.8087067
L321 F215 T: 145.8087067


I also found that after changing settings it looks like the script is trying to download from an URL to the network cache, but it is in the network cache...
image2.png
image2.png (10 KiB) Viewed 205 times
I don't understand the setting...I have specified the SiteCache settings, and the filenames under the URL part of the screen.
Looks like the script is thinking it now needs to download those files instead of looking it up in the SiteCache.

I did also change the version, as it is windows 11 I want to upgrade to. But that version number exists in 11 and 10...
image.png
image.png (35.58 KiB) Viewed 205 times
I think I'm still missing something big, I might just not think 'habitat style'

User avatar
Cubert
Posts: 2078
Joined: Tue Dec 29, 2015 7:57 pm
6
Contact:

Re: OS Upgrade script - the network path was not found

Post by Cubert »

I have to say that was harder than it had to be! I spent a little while defining how the script was getting that value. The original logic in automate code was a bit jumpy.

So I decided to fix it all!

We made this whole thing so much easier in the new Patch Remedy 5 so I decided to upgrade the Habitat OS upgrade service to the current PR5 standard. Below is the product of these changes.


So a new DLL is now available. Upgrade Habitat to 1.0.1.28 to get the new version of tool.

https://delivery.shopifyapps.com/-/ac4f ... b9b0ca9cc6



Here is the skinny:

Policies are out, you will not need to create different policies to define what ISO you want to use. We will assume that the latest feature upgrade is the intent and as such we do not need any file information from you to do that. We also simplified the user interaction.

If a user is logged into console desktop the script will prompt user to allow upgrade in the background to continue. If use allows then the upgrade continues else logs user canceled upgrade. If user is not logged in it will continue as directed.

In PR5 we moved the mass of the coding to a PowerShell script and out of the Automate scripting engine. So the new Habitat - OS Upgrade Service script is now just a few lines of automate code. This allows us to determine what is needed by OS prior to upgrade then allows us to use the Windows Upgrade Assistant to carry out the actual task. This is much cleaner and the added bonus is you do not need to supply files or locations.

The service is controlled by the automation management service so turns on and off by service setting.


WindowsOS-UpgradeManager.png
WindowsOS-UpgradeManager.png (79.09 KiB) Viewed 190 times


Scheduled upgrades will have the script scheduled on all the selected agent the day of the schedule for the time set by schedule. This is done to prevent DBagent restarts and other DB tasks that might wipe a script schedule from dropping a schedule set farther in advance.

If you schedule script for same day but later in time, the script will be scheduled when you save schedule for the time set by schedule.

The "Update Now" menu item will run the scripts now on all selected agents.

Enjoy!!

Post Reply

Return to “Habitat”