0

Does anyone know which environment variable is used to reference the location of the .wim files used for a WDS deployment?

For example the DeploymentShare has the folders below:

23/01/2019  15:29    <DIR>          Applications
19/07/2019  14:22            51,140 Audit.log
23/01/2019  15:29    <DIR>          Backup
18/07/2019  10:58    <DIR>          Boot
23/01/2019  15:29    <DIR>          Captures
15/07/2019  13:54    <DIR>          Control
01/07/2019  10:14    <DIR>          Operating Systems
23/01/2019  15:29    <DIR>          Out-of-Box Drivers
23/01/2019  15:29    <DIR>          Packages
26/04/2019  15:03    <DIR>          Scripts
24/01/2019  15:29    <DIR>          Servicing
23/01/2019  15:29    <DIR>          Templates
23/01/2019  15:29    <DIR>          Tools

I can reference the scripts with the variable %scriptroot%, but how can I reference the "Operating Systems" directory?

The reason why is that I want to try and script the dism apply-image process as it just isn't working when using the built in task.

Elliot Huffman
  • 1,169
  • 1
  • 10
  • 22
RLBChrisBriant
  • 493
  • 1
  • 6
  • 20
  • Have you tried "DeployRoot"? – Elliot Huffman Jul 20 '19 at 15:47
  • 1
    Thanks, will give that a go and let you know. Sorry for the late reply. – RLBChrisBriant Jul 23 '19 at 19:03
  • Did the `DeployRoot` code work? – Elliot Huffman Jul 26 '19 at 15:28
  • Hi, it didn't work, sorry for not responding. Basically, I am using WDS and am trying to deploy a preconfigured image to computers. Unfortunately the task to partition the drives doesn't allow me to specify the operating system which means that I hit a brick wall when trying to create the boot files. I can get round this by scripting it, but after it creates the boot files, I get errors. – RLBChrisBriant Jul 29 '19 at 09:52
  • That is true that it doesn't ask which index to deploy. But that is because it breaks out each index during import into MDT. Are you able to import the image into MDT? You can select the specific image once imported. So, if you let it apply the. Create your own boot files. Is this ok? – Elliot Huffman Jul 29 '19 at 11:00
  • 1
    Hi Elliot, I can import the image and get it to image to disk by using my own script to create the partitions then I can install the OS using the Microsoft Task and then my own script to create the boot files. It then comes up with errors, but the computer has imaged and I can boot into Windows. I will let you know the errors when I have access to it tomorrow. – RLBChrisBriant Jul 29 '19 at 14:00
  • The error returned is 80004005, "Task Sequence execution failed". I have looked online and can't find much information on it. There was a suggestion that it might be the Windows PE version so I tried updating it to the one equivalent to the OS being imaged, but it still gives this error. – RLBChrisBriant Aug 02 '19 at 09:53
  • Well the good news is that the PE version does not create the variables. It is a good practice to use the latest version so kudos to that. 80004005 is the windows equalivant of the http 404 error. Anytime you see that, it means something isn't found. I'll rev up MDT and try to grab a list of variables today. – Elliot Huffman Aug 02 '19 at 11:04
  • I was thinking about it, why not just use `%scriptroot%\..\Operating Systems`? This specifies "One directory up (parent directory)" from `%ScriptRoot%` and then to `\Operating Systems` – Elliot Huffman Aug 09 '19 at 02:42
  • 1
    Thanks, I have now managed to get it working, by using an out of the box task sequence and latest PE. I think I was last getting errors using the standard task sequence when there was a mismatch between the version of Windows PE. – RLBChrisBriant Aug 12 '19 at 08:07
  • I am glad you got it working. Could you write it as an answer? Thanks! – Elliot Huffman Aug 12 '19 at 12:12

1 Answers1

0

To get the deployment working, I used the standard template for the task sequence and I used the Windows PE version that matches the version of Windows 10 1903.

RLBChrisBriant
  • 493
  • 1
  • 6
  • 20