Post a reply to the thread: Detect if PC has BitLocker enabled?
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
Will turn www.example.com into [URL]http://www.example.com[/URL].
Re: Detect if PC has BitLocker enabled? Hi Alejandro, Perfect. You are welcome Friedrich
Re: Detect if PC has BitLocker enabled?
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,
Run Command Line cmd.exe /C %WINDIR%/sysnative/manage-bde.exe > C:\status.txt [Wait]
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
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
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
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.
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
Re: Detect if PC has BitLocker enabled? Originally Posted by linder 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.
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
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
Forum Rules