DISM.exe on Server 2012

Got a problem you cannot solve? Try here.
Post Reply
Adam
Posts: 26
Joined: Tue Jul 10, 2012 5:28 am

DISM.exe on Server 2012

Post 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
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: DISM.exe on Server 2012

Post 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
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Adam
Posts: 26
Joined: Tue Jul 10, 2012 5:28 am

Re: DISM.exe on Server 2012

Post 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
Adam
Posts: 26
Joined: Tue Jul 10, 2012 5:28 am

Re: DISM.exe on Server 2012

Post by Adam »

I've just tried with no elevation (run as invoker) and it still fails... I'm out of ideas.
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: DISM.exe on Server 2012

Post 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
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Adam
Posts: 26
Joined: Tue Jul 10, 2012 5:28 am

Re: DISM.exe on Server 2012

Post by Adam »

Well I worked it out... It was a pretty silly mistake on my behalf :oops:

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
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: DISM.exe on Server 2012

Post by FrancescoT »

Happy that you solved :D :D :D !

Refards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Post Reply