cloudbase / windows-imaging-tools

Tools to automate the creation of a Windows image for OpenStack, supporting KVM, Hyper-V, ESXi and more.
Apache License 2.0
656 stars 225 forks source link

Cannot provide absolute path for UnattendTemplate #378

Open DohouM opened 1 year ago

DohouM commented 1 year ago

Hey there !

I'm facing a problem with this script toolbox, which is, whenever I try to use a custom UnattendTemplate.xml, I encounter an issue : the WinImageBuilder.psm1 script always assume that the starting point to get the UnattendTemplate.xml is the folder of the toolbox. Unfortunately, when I need to point to an absolute path for this, through the unattend_xml_path variable in my config file, the script seems to be appending the absolute path to the path of the script root, like so : image

Which, in my case as you can see, results in the following path for my UnattendTemplate.xml : C:\Users\admsrv\windows-imaging-tools\C:\Users\admsrv\windows-builds\confs\w10\UnattendTemplate.xml. I'm not sure if this is intended behaviour, but I think I can provide a fix for that. Let me know if you're interested.

ader1990 commented 8 months ago

Hello,

The behaviour is indeed a legacy one from the previous version of the imaging tools. If you can provide a fix, it would be great!

Thank you, Adrian.