Convert .inf to .reg

Discuss & post Update Pack addons here.
Post Reply
Zoom7000
Posts: 98
Joined: Fri Jan 26, 2007 7:11 pm

Convert .inf to .reg

Post by Zoom7000 » Sat Mar 26, 2011 12:32 pm

Does anyone know how I can convert a .inf file to .reg so I can deploy it on a live installation?

I know you can use Reg2Inf for converting .reg files to .inf, but is there something for the opposite effect?

User avatar
ricktendo64
Posts: 3213
Joined: Mon May 22, 2006 12:27 am
Location: Honduras

Post by ricktendo64 » Sat Mar 26, 2011 12:55 pm

Apply the INF then go to your registry editor and export the changes (installwatch and regshot will also work)

User avatar
vmanda
Posts: 1634
Joined: Wed Apr 18, 2007 12:25 pm
Location: TM.Romania

Post by vmanda » Sat Mar 26, 2011 1:21 pm

ricktendo64 wrote:Apply the INF then go to your registry editor and export the changes (installwatch and regshot will also work)
But installwatch and regshot reflect only changes applied to test computer,
and inf registry keys that have same values as the one that allready exist
into test computer will not be reflected into final reg.
On different computers can have different values for same registry keys.

As a solution, some time ago,
1: i have started computer in vmware, install InstallWatchPro 2.5, if are not allready installed
2. started regedit and removed registry keys or, when posible, entire regitry branches that will be changed by inf,
3. make one Snaphot by using InstallWatchPro 2.5
4. run the inf
5. Analize changes by using InstallWatchPro
6. Filter results, because some keys are from another "movies"
InstallWatchPro 2.5c 3,70 MB, md5:162590D2653D9354C8232B987C64CE33

Zoom7000
Posts: 98
Joined: Fri Jan 26, 2007 7:11 pm

Post by Zoom7000 » Sat Mar 26, 2011 2:05 pm

In .reg files you need to type "REGEDIT4" or "Windows Registry Editor" at the top to make it a registry file. Is there anything I need to the top of the .inf file so that I can run it?

Also, how do I apply a .inf file?

User avatar
ricktendo64
Posts: 3213
Joined: Mon May 22, 2006 12:27 am
Location: Honduras

Post by ricktendo64 » Sat Mar 26, 2011 2:08 pm

Post your INF file lets see if it can be run

It needs a [DefaultInstall] section with AddReg=<reg_section_name_here>

Then you just right click it and choose install

Zoom7000
Posts: 98
Joined: Fri Jan 26, 2007 7:11 pm

Post by Zoom7000 » Sat Mar 26, 2011 3:20 pm

Here is my INF - Just a bunch of IE8 Tweaks.

Code: Select all

;Show Status Bar in all windows in Internet Explorer
HKLM,"SOFTWARE\Microsoft\Internet Explorer\Main","StatusBarWeb",0x00010001,1
;Show Status Bar in all Windows in Explorer
HKLM,"SOFTWARE\Microsoft\Internet Explorer\Main","StatusBarOther",0x00010001,1
;Force Internet Explorer Menu Bar to Top (above the address bar)
HKLM,"Software\Microsoft\Internet Explorer\Toolbar\WebBrowser","ITBar7Position",0x10001,1
;Disable "Open File Security Warning"
HKLM,"Software\Microsoft\Internet Explorer\Download","CheckExeSignatures",0x0,"No"
HKLM,"Software\Microsoft\Internet Explorer\Download","RunInvalidSignatures",0x10001,01,00,00,00
HKLM,"Software\Microsoft\Windows\CurrentVersion\Policies\Associations","LowRiskFileTypes",0x0,".zip;.rar;.nfo;.txt;.exe;.bat;.com;.cmd;.reg;.msi;.htm;.html;.gif;.bmp;.jpg;.avi;.mpg;.mpeg;.mov;.mp3;.m3u;.wav;"
HKLM,"Software\Microsoft\Windows\CurrentVersion\Policies\Attachments","SaveZoneInformation",0x10001,01,00,00,00
;Disable the Favorites Bar
HKLM,"Software\Microsoft\Internet Explorer\LinksBar","Enabled",0x10001,00,00,00,00
;Disable "Reuse windows for launching shortcuts (when tabbed browsing is off)"
HKLM,"Software\Microsoft\Internet Explorer\Main","AllowWindowReuse",0x10001,00,00,00,00
;Disable "Internet Explorer is not currently your default browser. Would you like to make it your default browser?"
HKLM,"Software\Microsoft\Internet Explorer\Main","Check_Associations",0x0,"no"
;Remove Internet Explorer first run dialogs
HKLM,"Software\Microsoft\Internet Explorer\Main","IE8RunOnceLastShown",0x10001,01,00,00,00
HKLM,"Software\Microsoft\Internet Explorer\Main","IE8RunOnceLastShown_TIMESTAMP",0x1,10,5b,dd,f1,61,df,cd,01
HKLM,"Software\Microsoft\Internet Explorer\Main","IE8RunOncePerInstallCompleted",0x10001,01,00,00,00
HKLM,"Software\Microsoft\Internet Explorer\Main","IE8TourShown",0x10001,01,00,00,00
;When a new tab is opened, open Your first home page (also remove the tabs welcome)
HKLM,"Software\Microsoft\Internet Explorer\TabbedBrowsing","NewTabPageShow",0x10001,01,00,00,00
;Always open pop-ups in a new tab
HKLM,"Software\Microsoft\Internet Explorer\TabbedBrowsing","PopupsUseNewWindow",0x10001,02,00,00,00
;Use inline AutoComplete (outside of Internet Explorer)
HKLM,"Software\Microsoft\Windows\CurrentVersion\Explorer\AutoComplete","Append Completion",0x0,"yes"
;Disable play sound and display message when a popup is blocked:
HKLM,"Software\Microsoft\Internet Explorer\New Windows","PlaySound",0x10001,00,00,00,00
HKLM,"Software\Microsoft\Internet Explorer\New Windows","UseSecBand",0x10001,00,00,00,00
;Do not cache failed DNS lookups
HKLM,"SYSTEM\CurrentControlSet\Services\Dnscache\Parameters","NegativeCacheTime",0x10001,00,00,00,00
;Dis-allow spying by web-sites
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\ProtocolDefaults","about",0x10001,04,00,00,00
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\ProtocolDefaults","about:",0x10001,04,00,00,00
;Allow Internet Explorer to open direct links to swf files
HKLM,"SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BLOCK_LMZ_SCRIPT","iexplore.exe",0x10001,00,00,00,00
;Set google.co.uk as the home page in Internet Explorer
HKLM,"Software\Microsoft\Internet Explorer\Main","Start Page",0x0,"http://www.google.co.uk/"
;Set google.com as the default search provider in Internet Explorer
HKLM,"Software\Microsoft\Internet Explorer\SearchScopes","DefaultScope",0x0,"{F203491B-27E3-463D-B1E9-62A6C65D094D}"
HKLM,"Software\Microsoft\Internet Explorer\SearchScopes","DownloadUpdates",0x10001,01,00,00,00
HKLM,"Software\Microsoft\Internet Explorer\SearchScopes","Version",0x10001,02,00,00,00
;Other search providers
HKLM,"Software\Microsoft\Internet Explorer\SearchScopes\{F203491B-27E3-463D-B1E9-62A6C65D094D}","DisplayName",0x0,"Google"
HKLM,"Software\Microsoft\Internet Explorer\SearchScopes\{F203491B-27E3-463D-B1E9-62A6C65D094D}","FaviconURL",0x0,"http://www.google.com/favicon.ico"
HKLM,"Software\Microsoft\Internet Explorer\SearchScopes\{F203491B-27E3-463D-B1E9-62A6C65D094D}","OSDFileURL",0x0,"http://download.microsoft.com/download/A/3/C/A3C89D63-E2F0-460D-9F5F-23B51EA52B5E/Google.xml"
HKLM,"Software\Microsoft\Internet Explorer\SearchScopes\{F203491B-27E3-463D-B1E9-62A6C65D094D}","ShowSearchSuggestions",0x10001,01,00,00,00
HKLM,"Software\Microsoft\Internet Explorer\SearchScopes\{F203491B-27E3-463D-B1E9-62A6C65D094D}","SuggestionsURL_JSON",0x0,"http://suggestqueries.google.com/complete/search?output=firefox&client=IE8&qu={searchTerms}"
HKLM,"Software\Microsoft\Internet Explorer\SearchScopes\{F203491B-27E3-463D-B1E9-62A6C65D094D}","URL",0x0,"http://www.google.com/search?q={searchTerms}&rls=com.microsoft:{language}&ie={inputEncoding}&oe={outputEncoding}&startIndex={startIndex?}&startPage={startPage}"
; Add SearchURL Keywords for Google and Wikipedia
HKLM,"Software\Microsoft\Internet Explorer\SearchUrl","provider",0x0
;Google
HKLM,"Software\Microsoft\Internet Explorer\SearchUrl\g",,0x0,"http://www.google.com/search?q=%%s"
HKLM,"Software\Microsoft\Internet Explorer\SearchUrl\g"," ",0x0,"+"
HKLM,"Software\Microsoft\Internet Explorer\SearchUrl\g","#",0x0,"%%23"
HKLM,"Software\Microsoft\Internet Explorer\SearchUrl\g","&",0x0,"%%26"
HKLM,"Software\Microsoft\Internet Explorer\SearchUrl\g","?",0x0,"%%3F"
HKLM,"Software\Microsoft\Internet Explorer\SearchUrl\g","+",0x0,"%%2B"
HKLM,"Software\Microsoft\Internet Explorer\SearchUrl\g","=",0x0,"%%3D"
;Wikipedia
HKLM,"Software\Microsoft\Internet Explorer\SearchUrl\wp",,0x0,"http://en.wikipedia.org/w/index.php?title=Special%%3ASearch&search=%%s"
HKLM,"Software\Microsoft\Internet Explorer\SearchUrl\wp"," ",0x0,"+"
HKLM,"Software\Microsoft\Internet Explorer\SearchUrl\wp","#",0x0,"%%23"
HKLM,"Software\Microsoft\Internet Explorer\SearchUrl\wp","&",0x0,"%%26"
HKLM,"Software\Microsoft\Internet Explorer\SearchUrl\wp","?",0x0,"%%3F"
HKLM,"Software\Microsoft\Internet Explorer\SearchUrl\wp","+",0x0,"%%2B"
HKLM,"Software\Microsoft\Internet Explorer\SearchUrl\wp","=",0x0,"%%3D" 

User avatar
ricktendo64
Posts: 3213
Joined: Mon May 22, 2006 12:27 am
Location: Honduras

Post by ricktendo64 » Sat Mar 26, 2011 4:31 pm

All you need to add is this to the top

Code: Select all

[Version]
Signature="Windows NT"
[DefaultInstall]
AddReg=Tweaks.AddReg
[Tweaks.AddReg]
; Put your tweaks under here
Right click INF file and choose Install

Zoom7000
Posts: 98
Joined: Fri Jan 26, 2007 7:11 pm

Post by Zoom7000 » Sun Mar 27, 2011 8:08 pm

Thanks Rick, I'll give that a whirl tomorrow and see how it goes.

Another question - Can you silently install an INF file like you can with a REG file? (E.g. regedit /s <filename>.reg)

yumeyao
Moderator
Posts: 1718
Joined: Sun Aug 27, 2006 9:24 pm
Location: Taiyuan, Shanxi, PR China

Post by yumeyao » Sun Mar 27, 2011 10:03 pm

Image
My work list(Hosted by dumpydooby)

User avatar
code65536
Posts: 735
Joined: Wed Mar 14, 2007 2:58 pm
Location: .us
Contact:

Post by code65536 » Sun Mar 27, 2011 10:04 pm

Zoom7000 wrote:Another question - Can you silently install an INF file like you can with a REG file? (E.g. regedit /s <filename>.reg)
rundll32.exe advpack.dll,LaunchINFSectionEx .\foobar.inf,DefaultInstall,,12,N

Change "DefaultInstall" to match the name of the install section in your INF and ".\foobar" to the path of your INF file.

Note that LaunchINFSectionEx does not support COM registrations, so if your INF has RegisterDlls, you can't use this.

Edit: ...and yumeyao beat me to the punch. :) Well, you can still manually use the rundll32 method if you don't want to download additional EXEs.
My addons: CmdOpen - HashCheck - Notepad2 - MS Runtimes - DirectX

Into the breach, meatbags!

User avatar
OnePiece Alb
Posts: 525
Joined: Sat Sep 01, 2007 7:01 pm
Location: Albania
Contact:

Post by OnePiece Alb » Mon Mar 28, 2011 7:50 am


SHO_GuN
Posts: 144
Joined: Fri Jun 30, 2006 11:26 pm

Post by SHO_GuN » Mon Mar 28, 2011 11:19 am

Nice tool - I have looked for a way to convert .reg to .inf WITHOUT having to have .NET installed - Thanks.

I also had looked for a way to convert .inf to .reg. However, when I use this tool, I get the following output no matter what .inf I use as input. Anyone know what I am doing wrong?

Code: Select all

Windows Registry Editor Version 5.00

; prog.addregSection

User avatar
OnePiece Alb
Posts: 525
Joined: Sat Sep 01, 2007 7:01 pm
Location: Albania
Contact:

Post by OnePiece Alb » Mon Mar 28, 2011 11:29 am

dxtool.exe necesito give him administrator rights?
Last edited by OnePiece Alb on Mon Mar 28, 2011 11:31 am, edited 1 time in total.

SHO_GuN
Posts: 144
Joined: Fri Jun 30, 2006 11:26 pm

Post by SHO_GuN » Mon Mar 28, 2011 11:31 am

OnePiece Alb wrote:dxtool.exe necesito give him permission to admin?
Yes - on XP with full admin permission.

User avatar
OnePiece Alb
Posts: 525
Joined: Sat Sep 01, 2007 7:01 pm
Location: Albania
Contact:

Post by OnePiece Alb » Mon Mar 28, 2011 11:37 am

sorry, I now have to test in Windows XP, why tell the truth all tests will or fate in windows 7 x64

SHO_GuN
Posts: 144
Joined: Fri Jun 30, 2006 11:26 pm

Post by SHO_GuN » Mon Mar 28, 2011 11:48 am

If you work on it, I have a suggestion that I think would be helpful...

When you select multiple files to cab, it would be nice if either a: the original files were deleted leaving just the cabbed files, or b: move the newly created cabbed files into a new directory.

Zoom7000
Posts: 98
Joined: Fri Jan 26, 2007 7:11 pm

Post by Zoom7000 » Mon Mar 28, 2011 12:25 pm

Thanks guys. Some very useful information there!

User avatar
OnePiece Alb
Posts: 525
Joined: Sat Sep 01, 2007 7:01 pm
Location: Albania
Contact:

Post by OnePiece Alb » Mon Mar 28, 2011 1:00 pm

Update http://www.ryanvm.net/forum/viewtopic.p ... 110#113110, and now everything ok in windows XP, added delete after option

cmd line
Dxtool.exe /CTDA file_path ;Cab Tool (Delete file after)

shortcut
Image

Ciao a tutti.

SHO_GuN
Posts: 144
Joined: Fri Jun 30, 2006 11:26 pm

Post by SHO_GuN » Mon Mar 28, 2011 1:49 pm

Cool - grandi opere. La ringrazio molto!

Cool - Works great. Thank you very much!


Edit: I have found a couple small bugs. The "Cancell" button should be "Cancel" (one "l").

Image



Also when I select more than ~35 files to mass cab, I get the following error. When I select less, all works fine. As stated earlier, I have full admin access. I get this error using both the /CT and /CTDA switches.

Image

User avatar
OnePiece Alb
Posts: 525
Joined: Sat Sep 01, 2007 7:01 pm
Location: Albania
Contact:

Post by OnePiece Alb » Mon Mar 28, 2011 6:52 pm

Autoit limit in windows xp (depending on the length of the line), while in Windows 7 and all ok

Ciao.

Post Reply