Reply to Thread

Post a reply to the thread: Detect if PC has BitLocker enabled?

Your Message

Click here to log in

What's the name of our main installation product (in uppercase letters), directly followed by the current year?

 

You may choose an icon for your message from this list

Additional Options

  • Will turn www.example.com into [URL]http://www.example.com[/URL].

Topic Review (Newest First)

  • 09-12-2014, 08:16 AM
    linder

    Re: Detect if PC has BitLocker enabled?

    Hi Alejandro,

    Perfect. You are welcome

    Friedrich
  • 09-12-2014, 07:15 AM
    LiquidIce

    Re: Detect if PC has BitLocker enabled?

    Hello Friedrich,

    I fixed it by doing:
    Code:
    Run Command Line cmd.exe /C %WINDIR%/sysnative/manage-bde.exe > C:\status.txt [Wait]
    Thanks for the help.

    Regards,
  • 09-12-2014, 06:13 AM
    linder

    Re: Detect if PC has BitLocker enabled?

    Alejandro,

    See attached screenshot. The file you are trying to call is located in the 64-bit Windows System folder, not the 32-bit one. That's why it failed in your case. Fix this and you should be done.

    Friedrich
  • 09-12-2014, 06:08 AM
    linder

    Re: Detect if PC has BitLocker enabled?

    "sysnative" is the important part here. Perhaps "manage-bde.exe" is a 64-bit tool? Sysnative is a virtual folder, a special alias, that can be used to access the 64-bit
    System32 folder from a 32-bit application or script. Using the 'Sysnative' folder will help you access 64-bit tools from 32-bit code

    Friedrich
  • 09-12-2014, 06:02 AM
    linder

    Re: Detect if PC has BitLocker enabled?

    Alejandro,

    There is as fundamental difference between CMD and calling from an application!!! Your >output.txt was emty; this means the parameters and/or calling method were incorrect

    See my previous post. Perhaps you have to use %WINDIR%\sysnative\manage-bde.exe?

    Friedrich
  • 09-12-2014, 05:57 AM
    LiquidIce

    Re: Detect if PC has BitLocker enabled?

    Friedrich,

    The parameters sent to manage-bde are correct, I tested them on a CMD before putting them on the line of code. Is it possible to make a .bat file and make the installer run it as administrator? If so, I'll just make the .bat and it seems to work when I do so.

    Alejandro.
  • 09-12-2014, 05:45 AM
    linder

    Re: Detect if PC has BitLocker enabled?

    Alejandro,

    Yes, in theory <g>. But all this has nothing to do with your elevated running setup. You need the correct specification for the "CreateProcess" API (you are using this now) or the "ShellExecuteEx" API call.

    BTW, I see quite a few references to "cmd.exe /c %WINDIR%\sysnative\manage-bde.exe -status" yada yada on Google. Perhaps you have to use something similar to this. I have never used "manage-bde.exe" so unfortunately, I can't tell you what the correct parameters and switches are.

    Friedrich
  • 09-12-2014, 05:21 AM
    LiquidIce

    Re: Detect if PC has BitLocker enabled?

    Quote Originally Posted by linder View Post
    BTW, I think your command line is incorrect. You need a fully qualified path specification to the manage-bde.exe location in Windows.

    Friedrich
    That's weird... If the setup runs in "elevated", in theory manage-bde should start form system32 and I already specify it by adding %SYS32DIR%...


    Alejandro.
  • 09-10-2014, 10:01 AM
    linder

    Re: Detect if PC has BitLocker enabled?

    BTW, I think your command line is incorrect. You need a fully qualified path specification to the manage-bde.exe location in Windows.

    Friedrich
  • 09-10-2014, 09:59 AM
    linder

    Re: Detect if PC has BitLocker enabled?

    Alejandro,

    That simply means that the command line did nothing Windows handles the redirection into the file. So if the file is empty, the command line output was empty

    Friedrich
This thread has more than 10 replies. Click here to review the whole thread.

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •