Page 1 of 1

Habitat Upgrade Assistant - Robocopy & MountDiskImage errors?

Posted: Fri Apr 09, 2021 4:20 am
by sirkerry
Are the MountDiskImage and Robocopy supposed to be throwing missing parameter errors?

Mounted ISO as Drive letter [ Mount-DiskImage : Missing an argument for parameter 'ImagePath'. Specify a parameter of type 'System.String[]' and try ]

ROBOCOPY Returned -> [ -------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows
-------------------------------------------------------------------------------

Started : Thursday, April 8, 2021 10:50:31 PM
Source - C:\WINDOWS\system32\Mount-DiskImage\
Dest - C:\WINDOWS\system32\:\

Files : Missing
an
argument
for
parameter
'ImagePath'.
Specify
a
parameter
of
type
'System.String[]'
and
try

Options : /DCOPY:DA /COPY:DAT /R:1000000 /W:30

------------------------------------------------------------------------------

ERROR : Invalid Parameter #17 : ":\"

Simple Usage :: ROBOCOPY source destination /MIR

source :: Source Directory (drive:\path or \\server\share\path).
destination :: Destination Dir (drive:\path or \\server\share\path).
/MIR :: Mirror a complete directory tree.

For more usage information run ROBOCOPY /?


**** /MIR can DELETE files as well as copy them ! ]

Dismount Drive Returned -> [ -------------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows
-------------------------------------------------------------------------------

Started : Thursday, April 8, 2021 10:50:31 PM
Source - C:\WINDOWS\system32\Mount-DiskImage\
Dest - C:\WINDOWS\system32\:\

Files : Missing
an
argument
for
parameter
'ImagePath'.
Specify
a
parameter
of
type
'System.String[]'
and
try

Options : /DCOPY:DA /COPY:DAT /R:1000000 /W:30

------------------------------------------------------------------------------

ERROR : Invalid Parameter #17 : ":\"

Simple Usage :: ROBOCOPY source destination /MIR

source :: Source Directory (drive:\path or \\server\share\path).
destination :: Destination Dir (drive:\path or \\server\share\path).
/MIR :: Mirror a complete directory tree.

For more usage information run ROBOCOPY /?


**** /MIR can DELETE files as well as copy them ! ]

Re: Habitat Upgrade Assistant - Robocopy & MountDiskImage errors?

Posted: Mon Apr 12, 2021 1:17 pm
by Cubert
Can you post a copy of your policy here so we can see what you have configured?

Re: Habitat Upgrade Assistant - Robocopy & MountDiskImage errors?

Posted: Tue Apr 13, 2021 8:14 pm
by sirkerry
Here you go:
CapturePolicy.PNG
CapturePolicy.PNG (40.08 KiB) Viewed 2785 times

Re: Habitat Upgrade Assistant - Robocopy & MountDiskImage errors?

Posted: Wed Apr 14, 2021 2:23 pm
by Cubert
First minor issue that overall should not cause issues but could. The Web URL should end without the "/" on the end. Other wise you may get at http(s)://weburl//webfile instead of a http(s)://weburl/webfile

Next, It looks like Robo Copy didn't get passed accurate information.

We should first test to see if ISO was successfully downloaded to

C:\windows\ltsvc\Habitat\Windows10UG\xxx.iso on the local agent?

Can you mount ISO and see files inside ISO manually?

The script then attempts to mount it and create a drive letter for it. Then runs robo copy to copy files from ISO drive to local drive.

So if robo copy is failing then ISO may be issue where mount failed.

If ISO was missing you should of received an error in script logs and it fail out before running robo copy.

So I suspect it had to do with a mount issue . Check the script logs during the process and post them up here. I suspect there maybe a issue when executing the mount command.

This will show up in the commands logs during script execution.


Post both command and script logs return messages here for review.