Bitlocker - Create System Partition using batch script

Hello All!

I am trying to get a system partition created on Windows 8.1 images that do not have a partition for BitLocker.

This is the command I have in a batch script file: bdeHdCfg.exe -target c: shrink -size 350 -quiet

I can run it manually successfully, however I cannot get BigFix to run it successfully. It gives me an exit code of 1. I can even run it using an admin MS SysInternals PSTools which is a command prompt that runs as system and it works.

Any thoughts?

Thank you!

32-bit redirection strike again?

Try adding
action uses wow64 redirection false
to your actionscript before running the batch file.

Or, as a test, use the PSTools to launch a 32-bit command prompt via
psexec -s c:\windows\syswow64\cmd.exe
and then see what (if anything!) happens when bdeHdCfg.exe is run in a 32-bit environment.

edit: probably nothing happens. I can see there is a 64-bit bdeHdCfg.exe, but no 32-bit equivalent is present. So I think disabling the 32-bit redirection in the action script is the way to go.

Thanks Jason for your prompt response! I will give it a shot and report back!

Hey Jason,

No luck with adding:
action uses wow64 redirection false
before running the batch file.

I get a very long exit code: -1063256027, that I can’t find any info on when searching Google.

Any other ideas I could try?

Thanks!

Afraid I’m out of ideas and haven’t used the tool myself.

Update:
Turns out I had changed the size in the script to 300 MB instead 350 MB which was the required minimum. Once I fixed this, combined with “action uses wow64 redirection false” I was able to get it working. Thanks for your help Jason!!

1 Like