盘符的存储位置?

kouzc 2017-04-17 11:17:55
请教大神盘符信息存储在哪?是这样的,在windows系统中假如自己更改了盘符(E(软件):改成F(软件),F(资料)盘改成E(资料)盘,这样在自己电脑中显示为C、D、E(资料)、F(软件))而后在PE系统查看磁盘情况显示为C、D、E(软件)、F(资料)。现在我想让PE中显示的磁盘情况与windows中一致。想法是能否获取之前系统保存的盘符信息(不知道保存在哪?)然后用这些信息重新排序PE的盘符。
...全文
303 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
kouzc 2017-04-19
  • 打赏
  • 举报
回复
谢谢各位提供的思路,最终解决的方式就是通过注册表。。。。。 请教同事得知,在PE下可以挂载之前系统的注册表(Reg Load ....)从而获取之前的一些信息,结贴
mLee79 2017-04-18
  • 打赏
  • 举报
回复
HKLM/SYSTEM/MountedDevices
  • 打赏
  • 举报
回复
保存在哪?肯定是windows注册表啊。但是PE是另一套系统,它并不知道之前系统的盘符映射。
赵4老师 2017-04-17
  • 打赏
  • 举报
回复
搜“Shell Extension” ?
赵4老师 2017-04-17
  • 打赏
  • 举报
回复
GetLogicalDriveStrings The GetLogicalDriveStrings function fills a buffer with strings that specify valid drives in the system. DWORD GetLogicalDriveStrings( DWORD nBufferLength, // size of buffer LPTSTR lpBuffer // pointer to buffer for drive strings ); Parameters nBufferLength Specifies the maximum size, in characters, of the buffer pointed to by lpBuffer. This size does not include the terminating null character. lpBuffer Pointer to a buffer that receives a series of null-terminated strings, one for each valid drive in the system, that end with a second null character. The following example shows the buffer contents with <null> representing the terminating null character. c:\<null>d:\<null><null> Return Values If the function succeeds, the return value is the length, in characters, of the strings copied to the buffer, not including the terminating null character. Note that an ANSI-ASCII null character uses one byte, but a Unicode null character uses two bytes. If the buffer is not large enough, the return value is greater than nBufferLength. It is the size of the buffer required to hold the drive strings. If the function fails, the return value is zero. To get extended error information, use the GetLastError function. Remarks Each string in the buffer may be used wherever a root directory is required, such as for the GetDriveType and GetDiskFreeSpace functions. QuickInfo Windows NT: Requires version 3.1 or later. Windows: Requires Windows 95 or later. Windows CE: Unsupported. Header: Declared in winbase.h. Import Library: Use kernel32.lib. Unicode: Implemented as Unicode and ANSI versions on Windows NT. See Also File I/O Overview, File Functions, GetDriveType, GetDiskFreeSpace, GetLogicalDrives
kouzc 2017-04-17
  • 打赏
  • 举报
回复
引用 3 楼 paschen 的回复:
http://blog.csdn.net/PerfectToday/article/details/48825737
你好!可能是我表达的不够清楚。。。。。。 我现在遇到个情况,就是windows中的盘符有可能跟PE中显示的不一致,然后就尝试着能不能在PE系统下取得之前系统的盘符信息,按照之前的这个盘符来显示。
kouzc 2017-04-17
  • 打赏
  • 举报
回复
引用 2 楼 zhao4zhong1 的回复:
搜“Shell Extension” ?
赵老师,GetLogicalDriveStrings应该不行 因为我此时是在PE系统下运行,调用GetLogicalDriveStrings获取不到之前windows盘符信息。。。至于“Shell Extension”得研究研究

3,882

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 其它技术问题
社区管理员
  • 其它技术问题社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧