Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Friday, July 27, 2018 11:29 AM
I'll try to explain what I intend to do. I have an encrypted drive and every time I unlock it I had to restart my laptop just to lock it again until recently I found a command line to relock the drive without restarting the system. The said command line is "manage-<g class="gr_ gr_17 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling" data-gr-id="17" id="17">bde</g> -lock DriveLetter: -<g class="gr_ gr_16 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="16" id="16">forcedismount</g>". now I want to know, is there anyway, so that I can make an executable file and then only by executing the said file, this command could run and my drive could be relocked? I hope I have conveyed what I intend to ask.
also, I am using Windows 10.
Thanks in advance.
regard
Wa As'slamu Allekum (Peace to you again)
Malik Muhammad Asad
All replies (1)
Friday, July 27, 2018 12:56 PM
Hi Malik Muhammad Asad.
According to what you wrote, it looks like you're using a PowerShell cmdlet to encrypt the drive.
First of all, you should write the instruction that locks the drive into a text file and save it with the .PS1 extension; then you could create a shortcut on your desktop that executes that command by invoking powershell.exe and passing that .PS1 file as parameter.
An alternative could be converting the PowerShell file into an .EXE file: read here to know how to do that.
Bye.
Luigi Bruno
MCP, MCTS, MOS, MTA