Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Visual Basic
Expertise: Beginner
Aug 22, 1997



Building the Right Environment to Support AI, Machine Learning and Deep Learning

Add New File Type into the Registration on the Fly

In reference to "Unregister a DLL with the Right Mouse Button in Win95" [VBPJ March 1996, page 72], I would like to suggest a tip that is much easier to use and edit. Any Win95 or NT 4.0 user can easily customize this tip. The tip given in the March issue had restrictions. It has no edit facility because the lines have to be coded and not all users can understand the code. Using Windows Explorer, you can easily perform all the operations. First, open Windows Explorer and select Options in the View menu. You will see the tab, which has two options-View and FileTypes. Select the FileTypes tab, where you can see all the registered file types. They have three buttons-NewType, Remove, and Edit. If you want to register an OCX file type, press the NewType Button. You will see an AddNewFileType dialog. Next, specify the Description of the file type, Associated extension, and Actions. Enter the description as "OCX File." In the Associated extension, type "OCX." Suppose you want to add a "Register" action-press the New button, and you get the NewAction dialog. Next, specify the action name and browse to select the application file, which will perform the given action or give the command line with full path. Here you give the action name as "Register" and press Browse to select the regsvr32.exe file. Normally, Regsvr32.exe resides in the Windows directory. Now the entry looks like "C:\Windows\Regsvr32." Press OK to save the action. Then, for Unregister, give the action name as "Unregister" and press Browse to select the regsvr32.exe file. Add the parameter /u for unregister. Now the entry looks like "C:\Windows\Regsvr32 /u." Remember, when adding a parameter, the path name should follow the MS-DOS path convention. By pressing the right mouse button on any OCX file listed in the Explorer, you will see the Register and Unregister option. Select the appropriate action to perform. The same procedure can be done for any file type. Using this option of Explorer, you can edit any existing action on any file type shown in the list, as well as remove the actions or the whole entry for the selected file type.
System Builders
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date