CN1790263B - Removable storage device and its icon changing method - Google Patents
Removable storage device and its icon changing method Download PDFInfo
- Publication number
- CN1790263B CN1790263B CN 200410077498 CN200410077498A CN1790263B CN 1790263 B CN1790263 B CN 1790263B CN 200410077498 CN200410077498 CN 200410077498 CN 200410077498 A CN200410077498 A CN 200410077498A CN 1790263 B CN1790263 B CN 1790263B
- Authority
- CN
- China
- Prior art keywords
- storage device
- icon
- mobile storage
- application program
- host system
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
- 238000000034 method Methods 0.000 title claims description 15
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 241001465754 Metazoa Species 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000003780 insertion Methods 0.000 description 1
- 230000037431 insertion Effects 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
Landscapes
- User Interface Of Digital Computer (AREA)
Abstract
本发明公开一种能自主变更图标的移动存储设备,所述移动存储设备是通过在其根目录下创建自动执行程序,并在设定路径下存放图标文件,在移动存储设备上电后,所述自动执行程序通过修改主机系统注册表的相关键值为图标文件的存放路径的方式,为移动存储设备显示设定图标。本发明提供的移动存储设备,其在主机系统中的图标可由用户选定或变更,通过设定个性化图标的方式,使移动存储设备在主机系统的操作平台上更易识别,方便使用,具有个性化特征。解决了现有的移动存储设备因在主机系统中显示的盘符图标的单一性,带来操作对象的识别困难,造成操作错误的问题。
The invention discloses a mobile storage device capable of independently changing icons. The mobile storage device creates an automatic execution program under its root directory and stores icon files under a set path. After the mobile storage device is powered on, the The automatic execution program displays and sets the icon for the mobile storage device by modifying the relevant key value of the registry of the host system to the storage path of the icon file. For the mobile storage device provided by the present invention, its icon in the host system can be selected or changed by the user. By setting a personalized icon, the mobile storage device is easier to identify on the operating platform of the host system, convenient to use, and has individuality. characteristics. The invention solves the problem that the identification of the operation object is difficult and the operation error is caused due to the singleness of the drive letter icon displayed in the host system of the existing mobile storage device.
Description
技术领域technical field
本发明关于移动存储领域,特别是关于盘符图标的显示与变更。The invention relates to the field of mobile storage, in particular to the display and change of a drive letter icon.
背景技术Background technique
随着技术的发展,消费性电子产品的种类逐渐增多,如个人数码相机、数码摄像头、USB接口网卡、移动存储设备、MP3播放器等,个人对电脑外挂设备的需求越来越多,电脑提供的外部接口也越来越多,以前个人电脑仅提供单一的USB接口,逐渐增加到两个USB接口,四个USB接口,还有继续增加的趋势。With the development of technology, the types of consumer electronic products are gradually increasing, such as personal digital cameras, digital cameras, USB interface network cards, mobile storage devices, MP3 players, etc., and individuals have more and more needs for computer external devices. Computers provide There are also more and more external interfaces. Previously, personal computers only provided a single USB interface, which gradually increased to two USB interfaces, and four USB interfaces, and there is a tendency to continue to increase.
另一个方面,随着存储技术的发展,硬盘的容量也越来越加,从1G、10G、几十G,直至上百G,仍有继续增加的趋势,个人电脑的硬盘随着容量的增加分区也逐渐增多,在此情形之下,当外部存储设备插入电脑后,如果操作系统分配给移动存储设备的图标种类是单一,特别是在接入多个移动存储设备之后,因不同移动存储设备的图标相同,没有显著的差异,用户在使用时,很容易将操作系统平台中显示的盘符与实际插入存储设备搞错,产生误操作。On the other hand, with the development of storage technology, the capacity of hard disks is also increasing. From 1G, 10G, dozens of G, to hundreds of G, there is still a trend of continuous increase. With the increase of capacity, the hard disk of personal computer Partitions are gradually increasing. In this case, when an external storage device is inserted into the computer, if the operating system assigns a single type of icon to the removable storage device, especially after accessing multiple removable storage devices, different removable storage devices may The icons are the same, and there is no significant difference. When users use it, it is easy to confuse the drive letter displayed on the operating system platform with the actual storage device inserted, resulting in misoperation.
有鉴于此,提供一种图标能自主变更的移动存储设备,实有必要。In view of this, it is necessary to provide a mobile storage device whose icons can be changed independently.
发明内容Contents of the invention
为了解决现有的移动存储设备因在主机系统中盘符图标显示的单一性问题,带来操作对像的难以识别,从而易于造成数据操作的失误,提供一种图标能自主变更的移动存储设备及方法。In order to solve the problem of the singleness of the drive letter icon display in the host system of the existing mobile storage device, which makes it difficult to identify the operation object, which is easy to cause data operation errors, a mobile storage device whose icon can be changed independently is provided. and methods.
本发明提供的移动存储设备图标变更方法,移动存储设备的根目录下创建有自动执行程序,所述方法包括以下步骤:安装应用程序于主机端,该应用程序是所述自动执行程序复制的自身或第二执行程序,其设有接收操作系统信息的窗口;所述窗口接收操作系统发送的移动存储设备接入的消息,通过读取到的私有信息,判断该设备是否为所述应用程序对应的移动存储设备,如是是,则应用程序通过函数调用在系统托盘上显示相应的图标,主动修改主机操作系统的注册表的相关键值为设定图标的存放路径,以及刷新操作系统。In the method for changing the icon of a mobile storage device provided by the present invention, an automatic execution program is created under the root directory of the mobile storage device, and the method includes the following steps: installing an application program on the host end, and the application program is itself copied by the automatic execution program Or the second execution program, which is provided with a window for receiving operating system information; the window receives the message of mobile storage device access sent by the operating system, and judges whether the device corresponds to the application program through the read private information If so, the application program displays the corresponding icon on the system tray through the function call, actively modifies the relevant key value of the registry of the host operating system to set the storage path of the icon, and refreshes the operating system.
所述方法还包括:所述应用程序在收到移动存储设备移除的消息后,将注册表中的相关键值删除。The method further includes: after the application program receives the message that the mobile storage device is removed, deletes the relevant key value in the registry.
优选地,所述应用程序是移动存储设备内的自动执行程序复制的自身或第二执行程序。Preferably, the application program is itself or a second execution program copied by the automatic execution program in the mobile storage device.
与现有技术相比,本发明提供的移动存储设备,其在主机系统中的图标可由用户选定或变更,通过设定个性化图标的方式,使移动存储设备在主机系统的操作平台上更易识别,更方便使用,更个性化。Compared with the prior art, the icon of the mobile storage device provided by the present invention in the host system can be selected or changed by the user. By setting personalized icons, the mobile storage device is easier to use on the operating platform of the host system. Identification, more convenient to use, more personalized.
附图说明Description of drawings
图1为本发明移动存储设备图标显示的流程图。Fig. 1 is a flow chart of the icon display of the mobile storage device in the present invention.
具体实施方式Detailed ways
本发明提供的图标能自主变更的移动存储设备,用户可以自行定义移动存储设备在主机系统平台中的图标。通过设定个性化图标的方式,如卡通人物、动物等图形,使闪存盘这种移动存储设备在主机系统的操作平台上更易识别,更方便使用,更有个性化性征。The invention provides a mobile storage device whose icon can be changed independently, and the user can define the icon of the mobile storage device on the host system platform by himself. By setting personalized icons, such as cartoon characters, animals and other graphics, the mobile storage device such as flash disk is easier to identify, more convenient to use, and more personalized on the operating platform of the host system.
本发明提供的移动存储设备的图标的标示方法主要通过在主机端的安装一应用程序实现,例如微软公司的Windows OS系列。通过这一常驻Windows系统的应用程序,该应用程序拥有一个能接收Windows系统信息的窗口。The marking method of the icon of the mobile storage device provided by the present invention is mainly realized by installing an application program at the host end, such as the Windows OS series of Microsoft Corporation. Through this resident Windows system application, the application has a window that can receive Windows system information.
在微软公司的Windows操作系统上,当操作系统检测到有新的移动存储设备,或其它存储介质,插入时,操作系统会向每个应用程序的窗口发送一条移动设备接入的消息,本发明实现的常驻Windows系统的应用程序也同样能检测到该消息,应用程序在收到该消息后,就可以取得相应接入设备的设备句柄,并可对设备进行物理读写,通过读取已定义好地址的设备数据来获得设备的私有信息。通过读取到的私有信息,判断该设备是否为软件对应的移动存储设备,如果是软件对应的移动存储设备,则调用相关设定图标的存放路径,在系统托盘上显示相应的图标,所述图标可以由用户自行定义,以便识别的方便。On the Windows operating system of Microsoft Corporation, when the operating system detects that a new mobile storage device or other storage medium is inserted, the operating system will send a mobile device access message to the window of each application program. The implemented application program resident in the Windows system can also detect the message. After receiving the message, the application program can obtain the device handle of the corresponding access device, and can physically read and write the device. By reading the Define the device data of the address to obtain the private information of the device. Through the read private information, it is judged whether the device is a mobile storage device corresponding to the software. If it is a mobile storage device corresponding to the software, the storage path of the relevant setting icon is called, and the corresponding icon is displayed on the system tray. Icons can be defined by the user for easy identification.
用户定义移动存储设备图标的方法通过修改Windows注册表的办法实现,在Windows操作系统上KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons这个键值下的内容是以盘符来对应的一些驱动器特性值,比如C盘如果有某些特性的话,则可以在该键值下找到C这个对应键值,而在C这个对应键值下还有一些定义了特性的键值,比如DefaultLabel就定义了磁盘的默认卷标值,而DefaultIcon则定义了磁盘的默认图标,该键值的内容即为图标文件的存放路径。本发明实现的应用程序可以在收到移动存储设备插入的消息并判定为对应的移动存储设备时,在注册表中创建或者修改对应的键值为用户自定义的图标,来实现驱动器图标的更改,并且在更改后调用SHChangeNotify这个系统API来即时刷新系统,使更改生效。应用程序在收到移动存储设备移除的时候,将注册表中的相对应键值删除,以防止用户插入其它的移动存储设备时在分配到的盘符相同的情况下也使用了软件定义的图标的情形。The method of user-defined mobile storage device icons is realized by modifying the Windows registry. On the Windows operating system, the contents under the key KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons are some drives corresponding to the drive letter Feature value, for example, if the C drive has some features, you can find the corresponding key value of C under the key value, and there are some key values with defined features under the corresponding key value of C, such as DefaultLabel. The default volume label value of the disk, and DefaultIcon defines the default icon of the disk, and the content of this key value is the storage path of the icon file. The application program implemented by the present invention can create or modify the corresponding key value in the registry to be a user-defined icon when receiving the message of the insertion of the mobile storage device and determining that it is the corresponding mobile storage device, so as to realize the change of the driver icon , and call the system API SHChangeNotify after the change to refresh the system immediately to make the change take effect. When the application program receives the removal of the removable storage device, it deletes the corresponding key value in the registry to prevent the user from using the software-defined Situation of the icon.
移动存储设备的图标的标示过程可以通过自动运行技术实现,有关自动运行的技术方案参见专利申请号03146090.9的专利申请。The marking process of the icon of the mobile storage device can be realized through the automatic operation technology. For the technical solution of the automatic operation, please refer to the patent application No. 03146090.9.
通过在移动存储设备的根目录下创建Autorun.inf文件,并在其中填入[AUTORUN]Icon=<Icon file path>,其中<Icon file path>是移动存储设备的图标文件的路径,在移动存储设备插入主机系统时,安装在存储设备内的自动执行程序启动。By creating the Autorun.inf file in the root directory of the mobile storage device, and filling it with [AUTORUN]Icon=<Icon file path>, where <Icon file path> is the path of the icon file of the mobile storage device, in the mobile storage When the device is plugged into the host system, a self-executing program installed in the storage device starts.
在自动执行程序运行的过程中,会弹出一个对话框提示用户选择显示的图标,并设定一个时间限制,例如3秒,如果在限定的时间限制内,用户没有选择,则使用之前保存的图标设定或者使用默认图标(初次使用的情况)。当然,对图标的变更也可通过用户点击系统托盘上出现的小图标的方式来打开对话框,进行更改并保存,而不必仅在移动存储设备插入主机后弹出对话框由用户选择。During the running of the automatic execution program, a dialog box will pop up to prompt the user to select the displayed icon and set a time limit, such as 3 seconds. If the user does not choose within the limited time limit, the previously saved icon will be used Set or use the default icon (in case of first use). Of course, the icon can also be changed by clicking the small icon on the system tray to open a dialog box, modify and save it, instead of only popping up a dialog box after the removable storage device is inserted into the host computer for selection by the user.
请参阅图1所示的移动存储设备的图标变更流程图,首先,移动存储设备上电10,也就是将移动存储设备插入主机系统;其次,移动存储设备中保存的自动执行程序运行20;然后,自动执行程序通过Shell_NotifyIcon()函数调用用来实现在系统托盘处显示一默认或者用户定义的小图标;接着,修改注册表键值40,也就是将DefaultIcon键值的内容更改为用户指定的图标文件的路径,这一路径下的图标可为默认图标或用户选定的图标;最后,自动执行程序调用函数SHChangeNotify()刷新操作系统窗口,新图标显现。Please refer to the icon change flow chart of the mobile storage device shown in Figure 1. First, the mobile storage device is powered on 10, that is, the mobile storage device is inserted into the host system; secondly, the automatic execution program stored in the mobile storage device runs 20; then , the automatic execution program is used to display a default or user-defined small icon on the system tray through the Shell_NotifyIcon() function call; then, modify the registry key value 40, that is, change the content of the DefaultIcon key value to the icon specified by the user The path of the file, the icon under this path can be the default icon or the icon selected by the user; finally, the automatic execution program calls the function SHChangeNotify () to refresh the operating system window, and the new icon appears.
再请参阅图1,根据autorun的实现方式,该自动执行程序也可通过将另一运行程序复制到主机系统中的某一位置,如图1所示的步骤22,简称为第二运行程序运行,然后由第二运行程序运行,修改注册表中的DefaultIcon键值。第二运行程序的详细运行过程描述如下。Please refer to Fig. 1 again, according to the implementation of autorun, the auto-execution program can also be run by copying another running program to a certain position in the host system, step 22 shown in Fig. 1, referred to as the second running program , and then run by the second running program to modify the DefaultIcon key value in the registry. The detailed running process of the second running program is described as follows.
第二运行程序启动后,首先确定存储设备24,即是哪个存储设备启动了自己(怎么启动这个运行程序),查找的过程是通过读取存储设备的IIR表来实现,在得到是哪个盘启动了自己后,同时也就得到该盘的盘符和句柄,这时程序首先通过Shell_NotifyIcon()函数调用移动存储设备内的图标文件的路径,在系统托盘处显示一个小图标,该图标可为默认图标或由用户选定的图标,而图标文件仍存放在移动存储设备内,用户以后可以通过点击这个图标可以弹出窗口,更改图标;紧接着程序通过修改注册表的方法来更改移动存储设备的图标;最后程序调用SHChangeNotify()函数来刷新Windows窗口,使新图标显现。After the second running program starts, first determine the storage device 24, that is, which storage device has started itself (how to start this running program), the process of searching is to realize by reading the IIR table of the storage device, which disk to start after obtaining After you have identified yourself, you will also get the drive letter and handle of the disk at the same time. At this time, the program first calls the path of the icon file in the mobile storage device through the Shell_NotifyIcon() function, and displays a small icon on the system tray. The icon can be the default The icon or the icon selected by the user, and the icon file is still stored in the mobile storage device, the user can click this icon to pop up a window to change the icon; then the program changes the icon of the mobile storage device by modifying the registry ;Finally, the program calls the SHChangeNotify() function to refresh the Windows window to make the new icon appear.
在完成这些操作后,第二运行程序一直处于睡眠状态,直到收到闪存盘移除的消息。收到移除消息后,第二运行程序修改注册表的内容,移除对应盘符的图标设置,然后再通过Shell_NotifyIcon()来移除系统托盘处的小图标,最后程序关闭自己,完成了整个流程。After completing these operations, the second running program is always in a sleep state until the message that the flash drive is removed is received. After receiving the removal message, the second running program modifies the contents of the registry, removes the icon setting corresponding to the drive letter, and then removes the small icon in the system tray through Shell_NotifyIcon(), and finally the program closes itself and completes the whole process. process.
以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,对本发明所作的若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above description is only a preferred embodiment of the present invention, it should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present invention, some improvements and modifications made to the present invention, these improvements and modifications are also It should be regarded as the protection scope of the present invention.
Claims (2)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 200410077498 CN1790263B (en) | 2004-12-13 | 2004-12-13 | Removable storage device and its icon changing method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN 200410077498 CN1790263B (en) | 2004-12-13 | 2004-12-13 | Removable storage device and its icon changing method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN1790263A CN1790263A (en) | 2006-06-21 |
| CN1790263B true CN1790263B (en) | 2010-05-26 |
Family
ID=36788157
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN 200410077498 Expired - Lifetime CN1790263B (en) | 2004-12-13 | 2004-12-13 | Removable storage device and its icon changing method |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN1790263B (en) |
Families Citing this family (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4912214B2 (en) * | 2006-07-25 | 2012-04-11 | キヤノン株式会社 | Information processing apparatus and object display method |
| US7966039B2 (en) | 2007-02-02 | 2011-06-21 | Microsoft Corporation | Bidirectional dynamic offloading of tasks between a host and a mobile device |
| CN101706724B (en) * | 2009-09-29 | 2012-11-14 | 宇龙计算机通信科技(深圳)有限公司 | Icon generation method and icon processing device |
| CN103677716A (en) * | 2013-12-13 | 2014-03-26 | 广州金山网络科技有限公司 | Disk signature display method and device |
| CN111198830B (en) * | 2019-11-22 | 2021-08-10 | 广州视源电子科技股份有限公司 | Identification method and device of mobile storage equipment, electronic equipment and storage medium |
| CN114327729A (en) * | 2021-12-30 | 2022-04-12 | 珠海豹趣科技有限公司 | Stable system icon replacement method and device |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1485787A (en) * | 2002-09-24 | 2004-03-31 | 联想(北京)有限公司 | Memory card identification method and marking equipment |
-
2004
- 2004-12-13 CN CN 200410077498 patent/CN1790263B/en not_active Expired - Lifetime
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1485787A (en) * | 2002-09-24 | 2004-03-31 | 联想(北京)有限公司 | Memory card identification method and marking equipment |
Non-Patent Citations (1)
| Title |
|---|
| 谢勇.电脑图标常用常新.软件世界.2004,36-37. * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN1790263A (en) | 2006-06-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| TW385388B (en) | Method for partitioning storage regions on hard disk and computer system adapted to the same | |
| JP3767818B2 (en) | Detachable device and program startup method | |
| EP0699995A1 (en) | Launching computer applications | |
| US8635591B2 (en) | Embedding software developer comments in source code of computer programs | |
| CN102662882B (en) | Method and device for unloading mobile storage equipment | |
| JP2004531814A (en) | Method and apparatus for improving the reliability of write-back cache information | |
| CN102197362A (en) | Surfacing and management of window-specific controls | |
| EP1969464A2 (en) | Persistent maintenance of customization data on computing devices | |
| JP2000148504A (en) | Information processing apparatus and method, and recording medium | |
| CN112306581B (en) | Method and medium for managing Basic Input Output System (BIOS) configuration by baseboard management controller | |
| KR101615646B1 (en) | Computer system, control method thereof and recording medium storing computer program thereof | |
| CN111782474A (en) | Log processing method, device, electronic device and medium | |
| CN1790263B (en) | Removable storage device and its icon changing method | |
| US7500082B2 (en) | Automating the testing of software or hardware components by dynamically creating virtual storage devices on a simulated system bus in a physical computer system | |
| CN111831224B (en) | Method, system and equipment for erasing residual space of exFAT partition file | |
| JP4870626B2 (en) | Information processing device | |
| US20080004857A1 (en) | Restoring base configuration on software testing computer | |
| CN1877527A (en) | Power-on system and method and mobile phone thereof | |
| JP3766429B2 (en) | Detachable device | |
| CN112540889A (en) | Method, device, equipment and medium for adjusting hard disk starting sequence in user state | |
| JP2003150321A (en) | Virtual storage device management apparatus, virtual storage device management method, virtual storage device management program, and computer-readable recording medium storing virtual storage device | |
| Image | User's Guide | |
| JP2004287552A (en) | Data erasing method for hard disk, computer program, and recording medium | |
| CN101354631B (en) | external storage device | |
| CN103699636A (en) | Method for moving folder/file randomly under WIN7-32/64bit operating system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant | ||
| CX01 | Expiry of patent term |
Granted publication date: 20100526 |
|
| CX01 | Expiry of patent term |