Link to home
Start Free TrialLog in
Avatar of eelou
eelou

asked on

How to speed up DISM on Windows

I am executing a cmd file from a  Installshield Installscript custom action (this is a Basic MSi installer, not a Suite installer). The cmd file sets 23 windows features, and takes 15\18 minutes.  How to speed things up?    Here is an example of two of the lines...

%Windir%\system32\Dism /online /Enable-Feature /NoRestart /FeatureName:IIS-WebServerRole
%Windir%\system32\Dism /online /Enable-Feature /NoRestart /FeatureName:IIS-HttpRedirect

Is powershell faster (and are the feature names the same in powershell)?

In either case, cmd\dism or Powershell, will it speed things up if I determine if the feature is already enabled, and thus do not execute the command to enable that feature?  If so, how to do this, please give exact example.  Thanks.
Avatar of John
John
Flag of Canada image

How long does it take?  For me, 15 to 20 minutes seems to do it (a bit shorter for Check Health and a bit longer for Restore Health). Powershell is not going to speed this up as DISM is doing its checking from the program. If you are within the limits above, that is what it takes.

DISM is a heavy duty repair program and takes time.
Avatar of eelou
eelou

ASKER

Will determining if already enabled, and if already enabled don't try to enable again, speed things up?
ASKER CERTIFIED SOLUTION
Avatar of John
John
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
@eelou  - Thanks and I was happy to help.