Page 1 of 1
DISM.exe on Server 2012
Posted: Tue Sep 18, 2012 5:18 am
by Adam
Is anyone having a problem running DISM.exe on Windows 2012? My command is pretty simple:
Code: Select all
DISM.exe /online /enable-feature /all /featurename:IIS-WebServerRole /featurename:IIS-ISAPIFilter /featurename:IIS-ISAPIExtensions /featurename:IIS-NetFxExtensibility /featurename:IIS-ASPNET /featurename:IIS-WebServerManagementTools /featurename:NetFx4Extended-ASPNET45 /NoRestart
It seems to fail when run through IA with no indication of why in the logs. I'm wondering if it's something to do with the UAC elevation? If I type the command manually in to CMD it works just fine.
The command works fine on Windows 7 and Server 2008 through IA (without the NetFx4Extended-ASPNET45 feature).
Cheers
Adam
Re: DISM.exe on Server 2012
Posted: Tue Sep 18, 2012 8:06 am
by FrancescoT
Dear Adam,
I'm not an expert on using DISM.exe at all, but I suppose you are using it with Run Program in IA.
How do you set the parameter for it?
This because if it works fine using CMD the same must work using Run Program too.
Regards
Re: DISM.exe on Server 2012
Posted: Tue Sep 18, 2012 8:57 am
by Adam
Hi Francesco,
That's exactly what I thought... I've tried Run Program and Run Program as to set a working directory.
As I said it works with Server 2008 and 7, but not Server 2012.
I'm using it to enable IIS and ASP.NET before the install begins.
I even tried creating a Batch File with Write Text To File but it still doesn't work when I run that. After the installation I can run the batch file and it works fine. This is why I think it might be something to do with UAC elevation, but I'm only guessing.
Cheers
Adam
Re: DISM.exe on Server 2012
Posted: Tue Sep 18, 2012 9:13 am
by Adam
I've just tried with no elevation (run as invoker) and it still fails... I'm out of ideas.
Re: DISM.exe on Server 2012
Posted: Tue Sep 18, 2012 9:31 am
by FrancescoT
Dear Adam,
if I haven't missed anything, you are saying that works correctly using Run Program with Win Server 2008.
am I correct?
By the way, you should use "highestAvailable (Elevate Administrators Only)" or "requireAdministrator (Always Elevate)" with you UAC project settings.
Also try to use "Run Program As" command (enables you to execute a program on the target system with advanced options).
Let me know.
Regards
Re: DISM.exe on Server 2012
Posted: Wed Sep 19, 2012 1:59 am
by Adam
Well I worked it out... It was a pretty silly mistake on my behalf
I had to set the installer to x64 mode.
Code: Select all
if Variable OS64 Equals TRUE
Comment: Set the Windows paths to x64
Set x64 - Native 64 bit Windows, AMD64 and EM64T Architectures - installation mode
end
----- DISM COMMANDS HERE -----
if Variable OS64 Equals TRUE
Comment: Set the Windows paths to x86
Set Win32 - Native 32 bit Windows and Windows 32 on Windows 64 (WOW64) - installation mode
end
Re: DISM.exe on Server 2012
Posted: Wed Sep 19, 2012 8:39 am
by FrancescoT
Happy that you solved

!
Refards