Pregunta

I can run " Dism.exe /online /enable-feature /featurename:NetFX3 /All /Source:E:\sources\sxs /LimitAccess " code in Command Prompt.

What I wan't to do is to run this code through Vb.net application.

¿Fue útil?

Solución

Use the Process.Start API to do this

System.Diagnostics.Process.Start( _
  "Dism.exe", _
  "/online /enable-feature /featurename:NetFX3 /All /Source:E:\sources\sxs /LimitAccess")

Note that you will possibly have to provide the full path to dism.exe

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top