Jump to content











Photo
- - - - -

Wasn't sure where to post this: BDE from WinPE : -rebootcount ?


  • Please log in to reply
3 replies to this topic

#1 Rootman

Rootman

    Frequent Member

  • Advanced user
  • 347 posts
  • Location:USA

Posted 12 December 2019 - 01:21 PM

I wasn't sure where to post this.

 

Once a week I boot to my WinPE and run a few scripts to clean up crap and run a chkdsk on my drives.  My company just implemented Bitlocker.  No problem, I just wrote a script and plunked it the root of my WinPe boot drive using the manage-bde -unlock -recoverypassword #####etc.  it works fine.  

 

I then wanted to use the -rebootcount manage-bde option to NOT have it lock and ask for the pin so I could reboot a couple of times to do some tasks without running the script.  Like so:

manage-bde -protectors -disable C: -rebootcount 10

 

This worked fine from the real OS command line, but fails from under WinPE stating the C: is not a boot drive - which I guess is true because the session of Win PE did not boot from the C: drive.

 

Is there any way to do the -rebootcount from WinPE's manage-bde command line? 

 

If I remember to do this from the real OS before I reboot to WinPE of course it works.  I'd just like to script it to run under WinPE.  Possible?



#2 alacran

alacran

    Gold Member

  • .script developer
  • 1246 posts
  •  
    Mexico

Posted 12 December 2019 - 03:51 PM

Usually when booting from a WinPE or a boot.wim file (X:\) the drive letters are not the same as when you are on Widows, so I suggest you to boot from your WinPE, and make note of the drive letters as seen from it, to use that on your script or batch file.

 

But always make sure there is not any other USB Mass Storage device plugged before booting your WinPE because it may alter the drive letters order.

 

alacran



#3 Rootman

Rootman

    Frequent Member

  • Advanced user
  • 347 posts
  • Location:USA

Posted 12 December 2019 - 08:39 PM

Well, in my case teh C: drive IS the HDD / SSD normal boot drive, my PE always loads it there.  I've confirmed it.

 

I have a feeling that the -rebootcount option cannot be done from PE because it is not booted from the media on which it was specified, even though you are able to specify the drive letter on the command line for everything else and it works, this appears not to.  It's likely just another stupid shortcoming of Microsoft's.  

 

I just parked a script on my USB script that contains the unlock command with the recovery key and the -rebootcount command and run it before rebooting to Win PE.  I just thought it would be handy to have it available within PE.  I created a second batch file to just do the -rebootcount and parked it there also. I will use that when working on users PC so as to avoid entering the PIN while working on it. 



#4 alacran

alacran

    Gold Member

  • .script developer
  • 1246 posts
  •  
    Mexico

Posted 12 December 2019 - 11:49 PM

It's good to know you found a workaround for the issue.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users