def add_package(package, ignore_check=False, prevent_pending=False, image=None, restart=False):
 cmd = ['DISM', '/Quiet', ('/Image:{0}'.format(image) if image else '/Online'), '/Add-Package', '/PackagePath:{0}'.format(package)]
 if ignore_check:
  cmd.append('/IgnoreCheck')
 if prevent_pending:
  cmd.append('/PreventPending')
 if (not restart):
  cmd.append('/NoRestart')
 return __salt__['cmd.run_all'](cmd)

def add_package ( package , ignore_check = False , prevent_pending = False , image = None , restart = False ) : cmd = [ 'DISM' , '/Quiet' , ( '/Image:{0}' . format ( image ) if image else '/Online' ) , '/Add-Package' , '/PackagePath:{0}' . format ( package ) ] if ignore_check : cmd . append ( '/IgnoreCheck' ) if prevent_pending : cmd . append ( '/PreventPending' ) if ( not restart ) : cmd . append ( '/NoRestart' ) return __salt__ [ 'cmd.run_all' ] ( cmd )
install a package using dism args: package : the package to install .