Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Windows VB.NET batch
Hello,
I need to do the following process automatically thorugh code(vb console app. or with commands in bat files)
 
MyComputer -> Tools -> Folder options -> File Types tab -> New
 
I need to add a new file type "GZ" through code(not manual process).
I came to know that we can do this by altering registry. But dont know how to do it progrmatically

Kindly help with this.
 

Thanks.
Posted 27-Nov-12 21:10pm
Edited 27-Nov-12 21:12pm
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

See this white paper[^]. You also need to check that the type you want to add is not already in use; on my system .gz is already registered.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

We can accomplish this by using REG commands.
 
REG ADD "HKEY_CLASSES_ROOT\.gz" /ve /d ft000005
 
finding the correct Dword data is important.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 8,149
1 Sergey Alexandrovich Kryukov 7,287
2 DamithSL 5,614
3 Manas Bhardwaj 4,986
4 Maciej Los 4,910


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 14 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100