none
Enable/Disable UWF with C# RRS feed

  • Question

  • Hello ,

    I would like to make an application with a combo box to select the drive to be protected.
    At the opening have a textbox that tells you if the UWF is enabled or not.
    And two buttons one that enables and disables the one that UWF.
    When one, for example, click on Enable you run commands to protect the unit that was selected in the combo box.

    Thanks so much
    Tuesday, April 4, 2017 1:55 PM

Answers

All replies

  • hello

    so you are planning to use Windows IoT Core and a UWP app to enable and disable UWF on your Windows IoT Core device ?

    br
    Andre

    Tuesday, April 4, 2017 2:19 PM
    Moderator
  • hello

    so you are planning to use Windows IoT Core and a UWP app to enable and disable UWF on your Windows IoT Core device ?

    br
    Andre

    Hello,
    sorry but I do not understand your question.
    One possibility is to run from c # code the command prompt and enable UWF but the question is whether a subsequent restart is enabled or not.
    If you were using the class ManagementClass do not know how it works and I do not know, for example, choose which disk drives to protect.
    Tuesday, April 4, 2017 2:46 PM
  • hello

    to me it looks like you have selected the wrong forum

    "This forum is for discussions of apps and driver development on versions of Windows that run on a variety of development boards like Raspberry Pi 2 and MinnowBoard MAX for developing smart, connected devices and IoT solutions."

    and i don't understand your relation between c#, command prompt and UWF

    edit:

    it seems you already asked the same question in a different forum

    https://social.msdn.microsoft.com/Forums/it-IT/966db352-f6be-47ef-988c-780bdb58b3ef/come-sapere-lo-stato-delluwf?forum=visualcsharpit#585aa7ad-963d-4dd4-b9df-d2b24a342ced

    br
    Andre



    Tuesday, April 4, 2017 2:55 PM
    Moderator
  • Hello Fede186,

    I assume you are asking about https://www.microsoft.com/en-us/download/details.aspx?id=50037

    Can you please explain what is unclear in the instructions for you?

    Sincerely,

    IoTGirl

    Tuesday, April 4, 2017 4:27 PM
    Moderator
  • Assuming you are working with Windows 10 Enterprise. There is a sample UWF C# application that comes with my book. You can download the files here: http://annabooks.com/Book_SGWin10IoTE.html See the Downloads section book files.

    You will have to do a restart when you select enable or disable.


    Sean Liming - Book Author: Starter Guide Windows 10 IoT Enterprise - www.annabooks.com / www.seanliming.com


    Tuesday, April 4, 2017 8:34 PM
  • Sean,

    I've tried the application UWFUtility and your code (any many other available code around the UWF topic) but when running under a normal user account the WMI instances are failing with Access Denied.

    I understand that enabling and disabling the UWF is an administrator privilege... but getting the configuration of the UWF should be able for all user because the MSDN documentation states that users on any kind can access the configuration.

    Any idea why this is a problem or are we running into a bug?

    Regards,

    Michel.

    Friday, August 25, 2017 8:59 AM
  • Thank you so much.

    You code was the solution I was looking for. :)

    Tuesday, September 18, 2018 6:37 AM
  • Would love to see example of code doing the same under Windows 10 iot core. It seems ManagementClass is missing there...

    Wednesday, January 16, 2019 7:38 AM
  • The code has to run under Administrator account to work. Regular user account will be blocked.

    Sean Liming - Book Author: Starter Guide Windows 10 IoT Enterprise - www.annabooks.com / www.seanliming.com

    Thursday, October 10, 2019 4:12 AM