I have no idea why my MDT scripts are running from the MDT deployment share 
(UNC) instead of the local copy.

Is it normal for %SCRIPTROOT% to point to the UNC of the MDT Deployment share?

This is causing trouble for the removeapps powershell script.  The PS script in 
offline mode looks like it assumes it is running from X: or another 
drive-lettered location and so I think it fails when it tries to list the path 
as $script:offlinepath, because that is null.   That only gets assigned  (lines 
110 and 151) if the path starts with "<N>:"

Can't figure out why my %SCRIPTROOT% is the UNC path instead of X:\something.

From: [email protected] [mailto:[email protected]] On 
Behalf Of Miller, Todd
Sent: Tuesday, August 02, 2016 10:26 AM
To: [email protected]
Subject: [MDT-OSD] RE: DISM powershell not loading after MSHTA

Never mind...

I remembered that MDT's "Extra files" copies the folder structure relative to 
the root of WinPE - so I was able to use ExtraFiles to get the .config file in 
the right spot.  Now for testing the fix.



From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of Miller, Todd
Sent: Tuesday, August 02, 2016 10:02 AM
To: [email protected]<mailto:[email protected]>
Subject: [MDT-OSD] RE: DISM powershell not loading after MSHTA

Thank you Michael.  You give me the strength I need to make it through the day.

I am trying to figure out a way to do this in a way that will survive MDT WinPE 
rebuilds (Update Deployment Share)

I mounted the WinPE.wim at
C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows 
Preinstallation Environment\amd64\en-us
Injected the .config file and committed the change, but it didn't make it into 
the LiteTouch_x64.wim

I'm not sure where I can stick that .config in a way that it will be 
incorporated.
I know how to add the file to litetouch_x64.wim - it sucks that I would need to 
redo it after each update, but at least I know how.  I am lost though on how 
I'd do the same to the ISO - which I need in order to boot the B&C VM...

So I'll keep trying to figure out how to incorporate the .config file into the 
boot image so that it is there when I do an Update Deployment share...

From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of Michael Niehaus
Sent: Monday, August 01, 2016 10:12 PM
To: [email protected]<mailto:[email protected]>
Subject: [MDT-OSD] RE: DISM powershell not loading after MSHTA

I did check the bug that I filed on this back in December.  It's still not 
fixed.  If you are running into this, please open a support case to "encourage" 
them to fix it.

Thanks,
-Michael

From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of Michael Niehaus
Sent: Monday, August 1, 2016 7:23 PM
To: [email protected]<mailto:[email protected]>
Subject: [MDT-OSD] RE: DISM powershell not loading after MSHTA

It's a separate issue, unrelated to the hotfix.

The .config file has always worked for me, but either a lot of other people 
can't follow my instructions or they are having different results.  Either way, 
I can't explain it.  I had simplified the testing to eliminate MDT from the 
picture with a generic Windows PE boot image and then just manually ran 
"mshta.exe http://bing.com"; followed by PowerShell and "import-module DISM" and 
could reproduce the issue.

Thanks,
-Michael

From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of Miller, Todd
Sent: Monday, August 1, 2016 4:08 PM
To: [email protected]<mailto:[email protected]>
Subject: [MDT-OSD] DISM powershell not loading after MSHTA

Is the problem of loading DISM after launching an MSHTA, described here 
https://blogs.technet.microsoft.com/mniehaus/2015/12/31/updated-remove-apps-script-and-a-workaround
fixed by that Hotfix for WinPE 1511 ADK 
https://support.microsoft.com/en-us/kb/3143760 - or is that an entirely 
separate problem?

I have been reading a bit on this and can't figure out what the best way to 
correct this problem of DISM not loading correctly during MDT.

Some say that that creating a .config file as Micahel's post suggests is not 
enough.  Other blogs say you have to copy a DLL out of the WAIK toolkit.

I see that the copy of Microsoft.Dism.PowerShell.dll included in the 1511 ADK 
at "Program Files (x86)\Windows Kits\10\Assessment and Deployment 
Kit\Deployment Tools\amd64\DISM" has an MD5 hash of 
31632e90280046d2efb020f7dcb23ab5

The copy of Microsoft.Dism.PowerShell.dll that gets installed by importing the 
DISM package into the WinPE image using the component import - and gets stored 
in the x64 WinPE.WIM at Windows\System32\WindowsPowerShell\v1.0\Modules\Dism is 
a different MD5 hash  71316d0f6f255f59efbe601f7dc33a58

The rest of the files in the WinPE 
Windows\System32\WindowsPowerShell\v1.0\Modules\Dism - the MD5 hash does match 
what is in the ADK.

People mention that it works to copy the version of the DLL that is included in 
the ADK over the top of what is in the WinPE boot once the computer is booted 
into WinPE - so that leads me to believe there is a problem with DISM component 
that makes it import the incorrect copy of the DLL.

The post Michael made about fixing this is from New Years Eve  - so has there 
been any update on the best way to correct the DISM vs MSHTA problem?

Not sure which thing to try... they are all kind of a pain to implement so I 
would like to fix it the best way first rather than try a bunch of things.

I tried mounting my LiteTouch WIM and then copying the 
Microsoft.Dism.PowerShell.dll file from the ADK over the top of the one in the 
WinPE's WIM file but I'm getting access denied - it is owned by Trusted 
Installer.  And even when I took owenership, I still couldn't delete or replace 
the file in the WIM and I tried lots of ways...

Anywho - Ideas?


________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the 
Electronic Communications Privacy Act, 18 U.S.C. 2510-2521 and is intended only 
for the use of the individual or entity to which it is addressed, and may 
contain information that is privileged, confidential, and exempt from 
disclosure under applicable law. If you are not the intended recipient, any 
dissemination, distribution or copying of this communication is strictly 
prohibited. If you have received this communication in error, please notify the 
sender immediately and delete or destroy all copies of the original message and 
attachments thereto. Email sent to or from UI Health Care may be retained as 
required by law or regulation. Thank you.
________________________________

________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the 
Electronic Communications Privacy Act, 18 U.S.C. 2510-2521 and is intended only 
for the use of the individual or entity to which it is addressed, and may 
contain information that is privileged, confidential, and exempt from 
disclosure under applicable law. If you are not the intended recipient, any 
dissemination, distribution or copying of this communication is strictly 
prohibited. If you have received this communication in error, please notify the 
sender immediately and delete or destroy all copies of the original message and 
attachments thereto. Email sent to or from UI Health Care may be retained as 
required by law or regulation. Thank you.
________________________________

________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the 
Electronic Communications Privacy Act, 18 U.S.C. 2510-2521 and is intended only 
for the use of the individual or entity to which it is addressed, and may 
contain information that is privileged, confidential, and exempt from 
disclosure under applicable law. If you are not the intended recipient, any 
dissemination, distribution or copying of this communication is strictly 
prohibited. If you have received this communication in error, please notify the 
sender immediately and delete or destroy all copies of the original message and 
attachments thereto. Email sent to or from UI Health Care may be retained as 
required by law or regulation. Thank you.
________________________________


________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the 
Electronic Communications Privacy Act, 18 U.S.C. 2510-2521 and is intended only 
for the use of the individual or entity to which it is addressed, and may 
contain information that is privileged, confidential, and exempt from 
disclosure under applicable law. If you are not the intended recipient, any 
dissemination, distribution or copying of this communication is strictly 
prohibited. If you have received this communication in error, please notify the 
sender immediately and delete or destroy all copies of the original message and 
attachments thereto. Email sent to or from UI Health Care may be retained as 
required by law or regulation. Thank you.
________________________________

Reply via email to