Easily implement the mouse button to add your own program to the system when making installations

xiaoxiao2021-03-06  69

Easily implement the mouse button to add your own program to the system when making an installer with Visual Studio .NET 2003

(Author: Tanghong law 2003-11-28) Sometimes we need to add your own programs to the right of the menu system in order to facilitate the user to start our program. As shown below, add the "My Resource Manager" that I have made to the system's right-click menu.

Realization: When the program is installed, modify the user's registry, add your own column to the system menu.

When using Visual Studio .NET 2003 to make an installer, it is very simple to implement this feature. The following is a specific production step: 1. Add a "installation item" to your project first. How to add an installation project, don't say it, there is a good description in helping documents. 2. In the Solution Explorer, right click on your installation item and select View "-> Registry" item in the pop-up menu; Figure 3. Click the Registry to enter the registry to modify the view. 4. Click HKEY_CLASES_ROOT to the left side "HKEY_CLASSES_ROOT", select "New Key" in the pop-up menu, named "*". 5. Click "*" to the right, select "New" -> "Item" in the pop-up menu, here you choose. For example, "myApp". 6. Right click "MyApp" and select "New" -> "string value" in the pop-up menu. At this time, new items will appear in the window on the right. Delete the name given by the system (right click, select "Delete" in the pop-up menu), then press Enter, then the name is automatically changed "(default)". This step is very important! 7. Right click "(Default)", find the "Value" in the Properties view, type "My Explorer". 8. Right click "MyApp" and select "New" -> "Item" and name "Command" in the pop-up menu. 9. Click "Command" to right, select "New" -> "string value" in the pop-up menu. Then, like the steps just now, change its name "(default)". Place his "value" property to "[Targetdir] [ProductName]" in the properties bar. If you look at it, you will know that it is set to your value to your program on the target computer. This is also very important. 10. Finally, in order to let the program can delete the information added in the registration table when uninstalling, don't forget to set "the deleeeeterial" attribute in "myApp" attribute to "True", and it is very good! Generate your installation project, then install it, you must have no problem! What we implement is this to add our own program link when you're rightt click on the file, if you want to implement the folder, or a specific file, the method is similar, just the location of the modified registry different. Everyone will try it out! Very fun!

转载请注明原文地址:https://www.9cbs.com/read-94201.html

New Post(0)