i2i8 Posted August 23, 2023 Share Posted August 23, 2023 (edited) I'm very sorry. I have to ask for help again. I want to use lis vol to find the efi partition and assign it a drive letter if it doesn't have one. The output is as follows: Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\windows\system32>chcp 437 Active code page: 437 C:\windows\system32> Microsoft DiskPart version 6.1.7601 Copyright (C) 1999-2008 Microsoft Corporation. On computer: WIN-9KKUI6K0PT8 DISKPART> Volume ### Ltr Label Fs Type Size Status Info ---------- --- ----------- ----- ---------- ------- --------- -------- Volume 0 E DVD-ROM 0 B No Media Volume 1 C NTFS Partition 39 GB Healthy Volume 2 FAT32 Partition 100 MB Healthy Hidden Volume 3 D NTFS Partition 49 GB Healthy DISKPART> The above result is the output after I insert windows_server_2008_r2.iso and boot from CD-ROM. On the first screen of boot, press Shift + F10 and run the following script. #RequireAdmin Global $sRet,$aRet Local $iPid = Run(@ComSpec & " /c (echo,chcp 437) | cmd.exe & (echo, lis vol) | diskpart.exe", "C:\windows\system32", @SW_HIDE, 0x8) ProcessWaitClose($iPid) $sRet = BinaryToString(StdoutRead($iPid, 1, 1), 1) MsgBox(0, "", $sRet) Next, how should I write this script to assign a drive letter to vol 2 ? Edited August 23, 2023 by i2i8 Link to comment Share on other sites More sharing options...
Nine Posted August 23, 2023 Share Posted August 23, 2023 Check help file for _WinAPI_SetVolumeMountPoint “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now