[Tool] Reg2Inf converter v0.46

Discuss & post Update Pack addons here.
User avatar
n7Epsilon
Moderator
Posts: 624
Joined: Thu Feb 17, 2005 1:37 am
Location: Cairo, Egypt

[Tool] Reg2Inf converter v0.46

Postby n7Epsilon » Fri May 05, 2006 2:28 pm

Hi everyone,
As I have seen the lack of decent Reg2Inf converters on the Internet (except for WillyPad which needs to support more than just strings and dwords), I have decided to write one of my own.

This Reg2Inf converter is also written in C# and runs completely on Regular Expressions. :wink:

I must thank vier and Aserone for all of their help on this, Aserone provided a reference INF (which was extremely helpful) and vier helped me find out about the comments bug.

Also a thank you goes to Siginet for providing an official forum for this tool (and giving me super mod powers :lol:):
http://www.siginetsoftware.com/forum/forumdisplay.php?f=12

Currently Supports:
- REG_SZ, REG_DWORD, REG_DWORD_BIG_ENDIAN, REG_LINK, REG_EXPAND_SZ, REG_MULTI_SZ, REG_BINARY, REG_QWORD, REG_FULL_RESOURCE_DESCRIPTOR, REG_RESOURCE_REQUIREMENTS_LIST and REG_NONE.
- AddReg and DelReg functionality.


Current Version is: 0.46
Download:
Main Link:
Download from SkyDrive
md5: 303E74C60C5D138FE0AB6611C1F6ABB4

- I apologize for not releasing the GUI frontend yet, but I am working on it. This is the most recent version of the Reg2Inf engine until I do release it.

Download includes C# source code, compiled executable is in \bin\Release inside the ZIP file. It also includes the Reg2InfHandler.cmd file to be copied to the SendTo folder.

Requires: .NET Framework 2.0 Final or higher

* Changelog:
0.46
- Fixed a regular expression bug that lead to dropping empty subkey declarations.

0.45
- Fixed a tiny bug that caused fixes to not be applied on the subkeyname causing corruption of the output Inf (only affects subkey names that have % or ")

0.44
- Fixed bug causing parser to fail if the regblock began with whitespace.
- Fixed internal regression causes internal check to trigger on empty regblocks (fixes OZ's issue)

0.42
- Minor performance changes (switch to generic dictionaries)
- INF file is now saved as Unicode (UTF16-LE) by default because saving as UTF8 caused Windows to mess up data in other language when re-importing the INF file.
- Fixes were not applied to ValueNameData unless it had a string value.

0.40
- Support for inline comments by the REG parser
- Fixed a rare issue with some combinations of slashes and quotes in REG_EXPAND_SZ and REG_MULTI_SZ.
- An internal check is now made to check for splitting problems (which lead to missing tweaks in output) and an error will be displayed if the check fails.
- Reg2Inf will now display the number of errors produced during conversion in the console output (to help with diagnosing non-working or non-converting tweaks due to syntax errors and to help with bug hunting)
- Code cleanup and some expression optimization
- Updated SimpleIniEditor (/forceascii will now save the REG file using ASCII and using the Current system codepage instead of defaulting to US English for all locales).

0.37
- Support for more formats (REG_DWORD_BIG_ENDIAN, REG_LINK, REG_RESOURCE_LIST, REG_FULL_RESOURCE_DESCRIPTOR, REG_RESOURCE_REQUIRMENTS_LIST) (hex(5-6-8-9-A)).
- Fixed a minor parsing oversight where it wouldn't match the hex type if the number was preceded by zeroes (eg: hex(03))
- Reg2Inf will now write a comment showing any lines that failed to convert in the output for easier testing in larger REG file conversions.
- Thanks for the research done by Mr.Woo for uncovering the more obscure REG types.

0.36
- Port of FGCBA's SimpleINIEditorV3 to Reg2Inf
- Switch to .NET 2.0 generics
- INF output is now written in Unicode BOM (which is the same encoding Windows Regedit uses to output v5 REG files) unless /forceascii is specified.
- Complete re-write of hex(2) and hex(7) engines to properly honor and support v4 and v5 REG files
- Full support for international and Unicode characters (in v5 REG files).
- Added support for Qword (hex(b)) (I have to thank to Mr.Woo for bringing it to attention that this type exists).

0.31
- Allowed Reg2Inf to process a list file containing paths to REG files to merge into one final INF file. (reg2inf @"ListFile.txt" ....)
- Process all subkeys and locate common roots and substitute with variables. (in /UseStrings instead of old behaviour)
- %16427% was removed because it wasn't being correctly substituted.
- Various performance optimizations.
- Fixed a bug where trailing commas in hex(2) and hex(7) would cause Reg2Inf to fail when it attempted to convert a blank string to a char, now also removes any trailing comma from hex (binary).

0.28
- Complete rewrite of Argument Parser (now at v2) - Removed silly workarounds.
- New switch /UseStrings to assign variables to subkeys and generate a [Strings] section in the output INF.

0.26
- Worked around Argument Parser limitation

0.25
- Fixed bug with fixes not being applied on REG_MULTI_SZ or REG_EXPAND_SZ.
- Added new fix for converting % to %%.
- Included Reg2InfHandler.cmd inside ZIP file with the source.

0.23
- Added proper errorlevel returning:
0 = No errors
5 = Argument Error (too many parameters / too few parameters / invalid parameter / REG file does not exist)
1 = Invalid REG file (conversion failed)
6 = Unsupported path format
10 = Something really unexpected (equivalent to a crash)

- Output INF file now contains [Optional Components] section so it can be correctly packaged into a separate addon without any modifications...

0.22
- Fixed all kinds of stupid regex confusion by removing all comments from the file in memory before processing.
- Fixed last RegLine in RegBlock being chopped off if there was a comment after it.
- All dword(s) are now padded to 8 characters by zeroes instead of now being dropped.
- HKCR / HKLM / HKCU and HKU are now recognized as valid root keys (although Windows Registry Editor does not support them), this is a kind of auto-repair functionality.

0.20
- Fixed many bugs when parsing empty subkeys (resulting INF was creating subkeys with @ set to "" which is inaccurate).
- Fixed bugs in parsing values with pathnames ending with a \, was confusing RegEx and adding an extra unnecessary quote.
- Fixed bug with not deleting temp files in some cases.
- Implemented DelReg functionality, output will be in DelReg section
Last edited by n7Epsilon on Wed Dec 02, 2009 8:31 am, edited 59 times in total.
Xable
Posts: 981
Joined: Tue May 03, 2005 6:38 pm
Contact:

Postby Xable » Fri May 05, 2006 3:20 pm

This sounds promising, i`m willing to host it under the same conditions as FGCBA if you like.

Otherwise you should PM ryan he may not read this thread.

You do good work thank you.
User avatar
n7Epsilon
Moderator
Posts: 624
Joined: Thu Feb 17, 2005 1:37 am
Location: Cairo, Egypt

Postby n7Epsilon » Fri May 05, 2006 3:22 pm

I already PM'd him thanks for the offer, don't want to burden your server too much :D
Xable
Posts: 981
Joined: Tue May 03, 2005 6:38 pm
Contact:

Postby Xable » Fri May 05, 2006 3:28 pm

No problem your choice.
User avatar
UtCollector
Posts: 462
Joined: Sun Apr 09, 2006 8:31 pm
Contact:

Postby UtCollector » Fri May 05, 2006 4:42 pm

Nice i give this 1 a try :D But with program do you think is best to get you're reg file?
User avatar
n7Epsilon
Moderator
Posts: 624
Joined: Thu Feb 17, 2005 1:37 am
Location: Cairo, Egypt

Postby n7Epsilon » Fri May 05, 2006 4:48 pm

REGEDIT ? RegAlyzer ?

If you mean to monitor installation programs, try InCtrl5 or InstallWatchPro / InstallRite.
Rudi1
Posts: 232
Joined: Sun Mar 06, 2005 2:49 am

Postby Rudi1 » Fri May 05, 2006 4:51 pm

Thanx a lot n7Epsilon for this tool!I try several tool to convert reg2inf,but allmost all not converting correct,so now I must try this one :P

Cheers!
User avatar
Siginet
Site Admin
Posts: 2894
Joined: Fri May 27, 2005 1:07 pm
Location: Planet Earth
Contact:

Postby Siginet » Fri May 05, 2006 4:53 pm

Very cool release! Thx!
Image
--Siginet--

Techware
Your Virtual Technician
Computer Management Software
superleiw
Posts: 127
Joined: Wed Aug 03, 2005 11:22 am

Postby superleiw » Fri May 05, 2006 5:41 pm

useful program thank you
User avatar
Aserone
Posts: 306
Joined: Sat Mar 11, 2006 8:46 pm
Location: Opioid dependent head.

Postby Aserone » Sat May 06, 2006 3:38 am

Awsome, and thanks for the source, thats all i've got time to look at for now, nicely commented. ;)
//Aserone-Foxy | EULA: Everything I say/post is a lie and/or forwarded from swim.
User avatar
vier
Posts: 531
Joined: Tue Nov 08, 2005 11:24 am

Postby vier » Sat May 06, 2006 6:07 am

Hello, it's possible to integrate your program in CréateurAddOn ?
User avatar
n7Epsilon
Moderator
Posts: 624
Joined: Thu Feb 17, 2005 1:37 am
Location: Cairo, Egypt

Postby n7Epsilon » Sat May 06, 2006 9:11 am

@vier, sure no problem, I have no problem with integrating this into CreatureAddon.

Please note that this is not yet completed though, I haven't added support for removing keys (via .REG files) yet. And note that this program requires the .NET Framework 2.0 Final to function.

Be sure to follow this thread, enjoy !
User avatar
vier
Posts: 531
Joined: Tue Nov 08, 2005 11:24 am

Postby vier » Sat May 06, 2006 11:38 am

Ok, thanks. I create a link to this post for simplify to 1.02 version !
User avatar
RyanVM
Site Admin
Posts: 5168
Joined: Tue Nov 23, 2004 6:03 pm
Location: Pennsylvania
Contact:

Postby RyanVM » Sat May 06, 2006 12:09 pm

n7epsilon, I've already mirrored it and replied to your PM. I don't know what you're waiting for...
Get up to $200 off on hosting from the same people who host this website!
http://www.ryanvm.net/forum/viewtopic.php?t=2357
User avatar
n7Epsilon
Moderator
Posts: 624
Joined: Thu Feb 17, 2005 1:37 am
Location: Cairo, Egypt

Postby n7Epsilon » Sat May 06, 2006 1:38 pm

Thanks Ryan, but for some reason I can't find the link in your reply ?

whoops, found it, sorry....
User avatar
RyanVM
Site Admin
Posts: 5168
Joined: Tue Nov 23, 2004 6:03 pm
Location: Pennsylvania
Contact:

Postby RyanVM » Sat May 06, 2006 3:03 pm

Great work, BTW :)
Get up to $200 off on hosting from the same people who host this website!

http://www.ryanvm.net/forum/viewtopic.php?t=2357
User avatar
n7Epsilon
Moderator
Posts: 624
Joined: Thu Feb 17, 2005 1:37 am
Location: Cairo, Egypt

Postby n7Epsilon » Sun May 07, 2006 4:49 pm

Updated to Version 0.20 ;)

Many bugfixes and implemented DelReg functionality...
This version is very accurate in conversion (better than last one).

@RyanVM, please update mirror, Thanks.
techtype
Posts: 268
Joined: Mon Aug 15, 2005 5:46 pm

Postby techtype » Sun May 07, 2006 5:04 pm

This is one great tool!! Thanks so much for your work on this. :D :D
tmike
Posts: 3
Joined: Sun May 07, 2006 12:30 am
Location: Texas, USA
Contact:

problematic .reg file

Postby tmike » Sun May 07, 2006 8:20 pm

as i was mentioning elsewhere, i have a problematic .reg file that your tool didn't work on ... and neither did most of the other reg->inf tools i tried.

in the registry, i have a item that looks like this:
HKCR/Folder/shell/itemname
(Default) REG_SZ "item title"

HKCR/Folder/shell/itemname/command
(Default) REG_EXPAND_SZ %SystemRoot%\yaddayadda

when it is exported using regedt32, the regfile exports the command (Default) key like this:
@=hex(2):25,00,53,00... and so on

and although this .reg file can be merged without any problem, only INF-Tool was able to create an INF using it.

if you want a copy of the .reg file, i'll send it to you if you want
---
tmike
tmike at tmike your pants dot com
(to email, remove your pants)
User avatar
n7Epsilon
Moderator
Posts: 624
Joined: Thu Feb 17, 2005 1:37 am
Location: Cairo, Egypt

Postby n7Epsilon » Mon May 08, 2006 3:27 am

Hmm... Reg2Inf is supposed to support this, but it could be a bug.

Can you please PM it to me ? If it's a bug I can fix it.
User avatar
n7Epsilon
Moderator
Posts: 624
Joined: Thu Feb 17, 2005 1:37 am
Location: Cairo, Egypt

Postby n7Epsilon » Mon May 08, 2006 3:59 am

Oh, I figured it out...

It's not a bug, it's just a wrong assumption. I always thought that the default value @ could only be string...
User avatar
n7Epsilon
Moderator
Posts: 624
Joined: Thu Feb 17, 2005 1:37 am
Location: Cairo, Egypt

Postby n7Epsilon » Mon May 08, 2006 11:19 am

Version 0.22 is finally up ;)

Regular Expressions are soooo tricky, one wrong edit and it can break so many cases...

Anyway, this release has many bugfixes, and the fix for commented REG files.
User avatar
ENU_user
Posts: 1253
Joined: Wed Jan 25, 2006 1:42 pm

Postby ENU_user » Mon May 08, 2006 11:56 pm

i tryied regtoinf thru these few lines http://rapidshare.de/files/19990549/Release.rar.html with the output included ,btw i wonder if duplicate entries can cause regtoinf to stop doing its job ,if its not an issue so nm
User avatar
Kelsenellenelvian
Moderator
Posts: 4380
Joined: Tue Nov 30, 2004 8:32 pm
Location: Pocatello, ID
Contact:

Postby Kelsenellenelvian » Tue May 09, 2006 12:57 am

Can this be made to use drag 'n drop style?
User avatar
n7Epsilon
Moderator
Posts: 624
Joined: Thu Feb 17, 2005 1:37 am
Location: Cairo, Egypt

Postby n7Epsilon » Tue May 09, 2006 3:21 am

@ENU_User, with reg file you provided, it is logical that it won't work. The lines in your REG file are not REG syntax in the 1st place !, they are already in an INF form ! Just cut the text from the REG file into the AddReg section and you're done.

Also, no, duplicate REG entries will output duplicate INF entries, but Reg2Inf will not stop conversion.

@Kels, this can be easily done... ;)
Create the following batch file and put Reg2Inf.exe in a folder present in your %PATH% (eg: %WinDir%\SYSTEM32):

Revised to fix path errors:

Code: Select all

@Echo Off
TITLE Reg2Inf Converter Handler
setlocal enableextensions

:start
set WORKFILE=%~1
set OUTFILE=%~dpn1.inf

If not defined WORKFILE goto usageinfo
If not exist "%WORKFILE%" goto notexist
If exist "%OUTFILE%" goto overwritewarning

:doit
Echo.
Echo ** Converting "%~nx1" ...
reg2inf.exe "%WORKFILE%" "%OUTFILE%"
Echo.
PAUSE
goto end

:overwritewarning
color 0a
Echo ** WARNING !
Echo.
Echo "%OUTFILE%": Already exists !
Echo.
:userpromptoverwrite
SET /P Result=- Overwrite ?:
if /I "%Result%"=="yes" goto doit
If /I "%Result%"=="no" goto end
goto userpromptoverwrite

:usageinfo
color 0a
Echo.
Echo ** %~nx0 [NameOfRegFileToConvert.Reg]
Echo.
Echo - The output INF will be created in the same folder as the input REG
Echo   and with the same name (in this case: NameOfRegFileToConvert.Inf)
Echo.
Echo - Input REG file must exist, you will be prompted if a file with the
Echo   same name as the Output INF already exists.
Echo.
Echo ** Press any key to exit . . .
PAUSE > NUL
goto end

:notexist
color 4f
Echo.
Echo ** "%WORKFILE%": Does not exist !
Echo.
Echo ** Press any key to exit . . .
PAUSE > NUL
goto end

:end
endlocal

and put it inside your SendTo folder and call it: Reg2Inf.cmd, you can also put it on your desktop and drop REG files on it.

Now to quickly convert a REG file, just right-click > Send To > Reg2Inf.cmd, the batch file will execute and create an INF file in the same folder as the REG file (and same name) and prompt you if a file already exists and allow you to choose to overwrite or not. (Because Reg2Inf overwrites without prompting)
Last edited by n7Epsilon on Thu Jun 08, 2006 5:21 pm, edited 2 times in total.
User avatar
Kelsenellenelvian
Moderator
Posts: 4380
Joined: Tue Nov 30, 2004 8:32 pm
Location: Pocatello, ID
Contact:

Postby Kelsenellenelvian » Tue May 09, 2006 3:59 am

Cool thanks.
Rudi1
Posts: 232
Joined: Sun Mar 06, 2005 2:49 am

Postby Rudi1 » Tue May 09, 2006 9:15 am

cmd script work like a sharm n7Epsilon,but I still have problems with conversion of my reg files to inf,becouse when I included it in addons and
when xp install is finnish this reg files still no work,no even one reg tweaks.I dont know why,but maybae you can look at this file and you can see what is wrong :oops:

thx!
reg file:
http://www.mytempdir.com/651570

addon:
http://www.mytempdir.com/653548
User avatar
n7Epsilon
Moderator
Posts: 624
Joined: Thu Feb 17, 2005 1:37 am
Location: Cairo, Egypt

Postby n7Epsilon » Tue May 09, 2006 1:37 pm

@Rudi1, There's nothing wrong with the conversion of the REG to INF file... (ie: Reg2Inf is working correctly :) )

The problem is far simpler in fact, the problem is that the INF file inside the addon CAB does not have a [Optional Components] section and its referenced section... :idea:

To fix your problem, after Reg2Inf converts the file, open the INF file in Notepad, the add the following text after the [Version] section:

Code: Select all

[Optional Components]
MyTweaks

[MyTweaks]


and then copy and paste the lines inside the [DefaultInstall] section to the [MyTweaks] section, and integrate the addon and they will work.

Reg2Inf does not do this automatically for you. To test the tweaks, right-click the INF file that is not working on integration and click "Install..." and you will find that the tweaks are merged !

I will add this as a switch in a later version...
Rudi1
Posts: 232
Joined: Sun Mar 06, 2005 2:49 am

Postby Rudi1 » Tue May 09, 2006 3:32 pm

Well,what i can say,the inf file is still mystery for me :oops: and without your explain I will still walk in the dark.I know you have a much important work to do like to explain such thing to newbie like me,but I'am really grateful to you for this :lol: and maybae some other members here to! Now I know where I'am fail.
Thank you for your help and such great tool!

Cheers!

Yeah,I just tested it and like you say,now my reg tweaks work !
It's easy when you know how you can made it and you have a teacher like you! :wink:
Alanoll
Posts: 17
Joined: Wed Nov 24, 2004 12:19 am

Postby Alanoll » Sun May 14, 2006 12:48 am

@"!_OMGHAxx004R!!!"


nice. lol. There's a few syntax styles of registry entries that you're missing though. I'll get you a copy of them on monday.
User avatar
n7Epsilon
Moderator
Posts: 624
Joined: Thu Feb 17, 2005 1:37 am
Location: Cairo, Egypt

Postby n7Epsilon » Sun May 14, 2006 4:27 am

Version 0.23 is up ;)

Quick update as I near my finals.

Added proper errorlevel returning, previously all cases would return 0. Codes are in 1st post (this would help integrating reg2inf into other programs).

Output INF file now contains the [Optional Components] section, so it can be packaged into an addon without any modifications (which would solve Rudi1's problems without modifications)

@Alanoll, Hi!
I had to come up with a very unique string that can be used as a basis for splitting the REG file into consistent blocks...

I thought that no sane REG file should have "!_OMGHAxx004R!!!" in it :lol: .

The types I implemented are those I could ordinarily find in the registry, I think there's hex(a) / hex(b) or something like that, but I didn't see any keys of that type casually browsing the registry...

Looking forward to seeing the new types... This will make Reg2Inf even better...
Rudi1
Posts: 232
Joined: Sun Mar 06, 2005 2:49 am

Postby Rudi1 » Sun May 14, 2006 5:47 am

Output INF file now contains the [Optional Components] section, so it can be packaged into an addon without any modifications (which would solve Rudi1's problems without modifications)


You rock man with this tools :lol: before your explanation I have problems though,but now I made addon with my best registry tweaks and worrrrrrrrrk like a sharm!Now the only problem will be that I have no new registry tweak which one I can use :lol:
Thanx again for this nice tool!

Cheers!
User avatar
owikh84
Posts: 151
Joined: Sat Feb 04, 2006 11:13 am
Location: Tokyo, Japan

Postby owikh84 » Mon May 22, 2006 11:09 pm

sorry noob question. how do i install this? any installer?
Image
User avatar
n7Epsilon
Moderator
Posts: 624
Joined: Thu Feb 17, 2005 1:37 am
Location: Cairo, Egypt

Postby n7Epsilon » Tue May 23, 2006 3:02 am

It does not need to be installed, (just make sure you have the .NET Framework installed) and then take the Reg2Inf.exe file (inside the bin\Release folder inside the ZIP file) and put it in your SYSTEM32 folder.

Then you use it from the command line, or copy and paste the code of the batch file in one of the previous posts above and save it in your SendTo folder as Reg2Inf.cmd, and then you can also use it using Right-Click > SendTo.

The SendTo folder is located in %SystemDrive%\Documents and Settings\%USERNAME%\SendTo.
User avatar
n7Epsilon
Moderator
Posts: 624
Joined: Thu Feb 17, 2005 1:37 am
Location: Cairo, Egypt

Postby n7Epsilon » Sun May 28, 2006 5:27 am

Planned for next version:

- Add extra switch that will make Reg2Inf look for replacable parameters (eg: C:\Program Files) and automatically replace with INF equivalent parameter (eg: %16422%) in AddReg and DelReg sections.
User avatar
Kelsenellenelvian
Moderator
Posts: 4380
Joined: Tue Nov 30, 2004 8:32 pm
Location: Pocatello, ID
Contact:

Postby Kelsenellenelvian » Wed Jun 07, 2006 1:36 am

I cant get your command file mod you posted to work. Will you take a look at it for me please. I followed you instructions exactly as you posted them and all it does is flash the command windows to quick for me to see anything and there is no output.
User avatar
n7Epsilon
Moderator
Posts: 624
Joined: Thu Feb 17, 2005 1:37 am
Location: Cairo, Egypt

Postby n7Epsilon » Wed Jun 07, 2006 2:24 am

@Kels, I have fixed it now, please re-copy the code from the post above, and save in your SendTo folder as Reg2Inf.cmd, To use right-click a REG file and Send To > Reg2Inf.cmd .

Let me know if there are still any problems ;) .
User avatar
n7Epsilon
Moderator
Posts: 624
Joined: Thu Feb 17, 2005 1:37 am
Location: Cairo, Egypt

Postby n7Epsilon » Thu Jun 08, 2006 6:24 pm

I have successfully implemented a replacer function in Reg2Inf version 0.24, but I can't seem to find a qualified list of INF variables anywhere...

- Can anyone please provide a list ? (eg: %1642% = %ProgramFiles%)
- Also I have a question, do INFs understand %ProgramFiles% and other Environment variables that are available from the console ?

I will release this as a beta first for testing as soon as I have implemented them.

I'm sure that this will come in handy for making INF based installs...
Xable
Posts: 981
Joined: Tue May 03, 2005 6:38 pm
Contact:

Postby Xable » Thu Jun 08, 2006 7:39 pm

Here`s a small one Linkage and gosh`s site had a few but it seems to be pass protected nowadays :( more linkage.
User avatar
n7Epsilon
Moderator
Posts: 624
Joined: Thu Feb 17, 2005 1:37 am
Location: Cairo, Egypt

Postby n7Epsilon » Fri Jun 09, 2006 7:45 am

@Xable Thanks, I have implemented most of them.

New version for testing (learnt from my mistakes this time ;))

Reg2Inf 0.24 Beta:
http://rapidshare.de/files/22614008/Reg2Inf_024_BETA.zip.html
md5: 98DFE467452808B5A9B86686F8311E41

Changelog:
- Added new switch /RepVars to make Reg2Inf look for common phrases like C:\WINDOWS and replace with INF variable (%10%) and so on...


Please test and provide feedback, Thanks a lot ;)
Last edited by n7Epsilon on Fri Jun 16, 2006 11:48 am, edited 1 time in total.
User avatar
RyanVM
Site Admin
Posts: 5168
Joined: Tue Nov 23, 2004 6:03 pm
Location: Pennsylvania
Contact:

Postby RyanVM » Fri Jun 09, 2006 9:10 am

I'm trying to get in contact with xper to find out why gosh's site is password protected now
Get up to $200 off on hosting from the same people who host this website!

http://www.ryanvm.net/forum/viewtopic.php?t=2357
User avatar
RyanVM
Site Admin
Posts: 5168
Joined: Tue Nov 23, 2004 6:03 pm
Location: Pennsylvania
Contact:

Postby RyanVM » Fri Jun 09, 2006 9:33 am

Gosh's site is gosh.msfn.org now
Get up to $200 off on hosting from the same people who host this website!

http://www.ryanvm.net/forum/viewtopic.php?t=2357
Rudi1
Posts: 232
Joined: Sun Mar 06, 2005 2:49 am

Postby Rudi1 » Fri Jun 09, 2006 3:58 pm

Thx for update! :o
Something strange is in my sytem,becouse when I put reg2inf.exe in my system32 folder and when I run cmd script then reg2inf is deleted itself and is not anymore in system32.I try it on 2 computers and is the same.
Do you maybae know n7Epsilonwhy ?
User avatar
n7Epsilon
Moderator
Posts: 624
Joined: Thu Feb 17, 2005 1:37 am
Location: Cairo, Egypt

Postby n7Epsilon » Sat Jun 10, 2006 5:11 am

That is strange since it works correctly for me and doesn't get deleted...

Try copying Reg2Inf.exe in your WINDOWS folder instead of your SYSTEM32 folder or any other folder in your PATH...

Also, try renaming the CMD script to something other than Reg2Inf.cmd, rename it to Reg2InfHandler.cmd

Maybe they are in the same folder and Windows is running the CMD instead of the EXE when you execute Reg2Inf...
User avatar
5eraph
Moderator
Posts: 4441
Joined: Tue Jul 05, 2005 9:38 pm
Location: Riverview, MI USA

Postby 5eraph » Sat Jun 10, 2006 6:01 am

n7Epsilon wrote:Maybe they are in the same folder and Windows is running the CMD instead of the EXE when you execute Reg2Inf...

That was standard behavior in DOS a long time ago with BAT files; not sure about now. If that's still the case then renaming the CMD file will fix it.
Rudi1
Posts: 232
Joined: Sun Mar 06, 2005 2:49 am

Postby Rudi1 » Sat Jun 10, 2006 6:12 am

n7Epsilon wrote:
Try copying Reg2Inf.exe in your WINDOWS folder instead of your SYSTEM32 folder or any other folder in your PATH...

Also, try renaming the CMD script to something other than Reg2Inf.cmd, rename it to Reg2InfHandler.cmd



I try your suggestion and I'am put reg2inf in Windows folder,also I'am rename cmd file and now work like a sharm and reg2inf file is still in Windows folder.
This is the great tool n7Epsilon ! and I enjoy when I run it :lol:
Thx for your reply and of corse for your work,now is everything like it must to be :wink:
Rudi1
Posts: 232
Joined: Sun Mar 06, 2005 2:49 am

Postby Rudi1 » Mon Jun 12, 2006 12:02 pm

Hey n7Epsilon!

I'am tested your update reg2inf and I must say that some reg tweaks which one is work with 0.23 version now with 0.24 not work.
It's only few of them,but "hey"strange again :oops:
I'am send you a link for files,so you can see it :lol:

bye!and keep up this amazing tool!
User avatar
n7Epsilon
Moderator
Posts: 624
Joined: Thu Feb 17, 2005 1:37 am
Location: Cairo, Egypt

Postby n7Epsilon » Mon Jun 12, 2006 5:30 pm

Hi Rudi1! Nice of you to report back... :)

There is an error in "Herby.reg":

Code: Select all

;TCP/IP Helper
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LmHosts]
"Start"=dword:00000004

Missing [ before HKEY_LOCAL_MACHINE..., once corrected it seems to convert ok...

Second thing I'm not sure about is this line in "Herby.reg":
[HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\Shell\CT\Command]
@=hex(2):63,00,6d,00,64,00,2e,00,65,00,78,00,65,00,20,00,2f,00,63,00,20,00,63,\
00,64,00,20,00,22,00,25,00,57,00,69,00,6e,00,44,00,69,00,72,00,25,00,5c,00,\
54,00,65,00,6d,00,70,00,5c,00,22,00,20,00,26,00,26,00,20,00,64,00,65,00,6c,\
00,20,00,2a,00,2e,00,2a,00,20,00,2f,00,66,00,20,00,2f,00,71,00,20,00,26,00,\
26,00,20,00,28,00,66,00,6f,00,72,00,20,00,2f,00,64,00,20,00,25,00,25,00,61,\
00,20,00,69,00,6e,00,20,00,28,00,2a,00,29,00,20,00,64,00,6f,00,20,00,72,00,\
64,00,20,00,22,00,25,00,25,00,61,00,22,00,20,00,2f,00,71,00,20,00,2f,00,73,\
00,29,00,20,00,26,00,26,00,20,00,63,00,64,00,20,00,22,00,25,00,55,00,73,00,\
65,00,72,00,50,00,72,00,6f,00,66,00,69,00,6c,00,65,00,25,00,5c,00,4c,00,6f,\
00,63,00,61,00,6c,00,20,00,53,00,65,00,74,00,74,00,69,00,6e,00,67,00,73,00,\
5c,00,54,00,65,00,6d,00,70,00,5c,00,22,00,20,00,26,00,26,00,20,00,64,00,65,\
00,6c,00,20,00,2a,00,2e,00,2a,00,20,00,2f,00,66,00,20,00,2f,00,71,00,20,00,\
26,00,26,00,20,00,28,00,66,00,6f,00,72,00,20,00,2f,00,64,00,20,00,25,00,25,\
00,61,00,20,00,69,00,6e,00,20,00,28,00,2a,00,29,00,20,00,64,00,6f,00,20,00,\
72,00,64,00,20,00,22,00,25,00,25,00,61,00,22,00,20,00,2f,00,71,00,20,00,2f,\
00,73,00,29,00,00,00


which currently converts to in 0.23 and 0.24 BETA:
HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\Shell\CT\Command",,0x00020000,"cmd.exe /c cd "%WinDir%\Temp\" && del *.* /f /q && (for /d %%a in (*) do rd "%%a" /q /s) && cd "%UserProfile%\Local Settings\Temp\" && del *.* /f /q && (for /d %%a in (*) do rd "%%a" /q /s)"


EDIT: I've looked into it, the only problem is a missing set of quotes and an extra %, but that's it, I'll fix it when I get more free time (in exactly 3 days), I'll have my summer vacation..., it should convert to this:
HKCR,"CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\Shell\CT\Command",,0x00020000,"cmd.exe /c cd ""%WinDir%\Temp\"" && del *.* /f /q && (for /d %%%a in (*) do rd ""%%%a"" /q /s) && cd ""%UserProfile%\Local Settings\Temp\"" && del *.* /f /q && (for /d %%%a in (*) do rd ""%%%a"" /q /s)"


------
EDIT: This has been fixed now.

The reason for this was that I would only apply the known INF fixes (single quote -> double quote / double-backslash -> single-backslash) on REG_SZ and not on any other type...

Another fix was also needed (convert %% to %%%)...
Last edited by n7Epsilon on Tue Jul 04, 2006 3:26 am, edited 1 time in total.
User avatar
n7Epsilon
Moderator
Posts: 624
Joined: Thu Feb 17, 2005 1:37 am
Location: Cairo, Egypt

Postby n7Epsilon » Fri Jun 16, 2006 11:54 am

Ok, I've fixed these bugs (sorry for the delay, my WD drive was damaged :( and I am still recovering from it)...

Here's the new release: 0.25
Link: http://rapidshare.de/files/23224590/Reg2Inf_025.zip.html
md5: 4EFEEB668737478712BC9506202F1E2D

Changelog:
- Fixed bug with fixes not being applied on REG_MULTI_SZ or REG_EXPAND_SZ.
- Added new fix for converting % to %%.
- Included Reg2InfHandler.cmd inside ZIP file with the source.


Please tell me if this fixes your problems...
Keep the feedback coming ;).
User avatar
RyanVM
Site Admin
Posts: 5168
Joined: Tue Nov 23, 2004 6:03 pm
Location: Pennsylvania
Contact:

Postby RyanVM » Sat Jun 17, 2006 8:55 pm

/linesonly seems to be broken. If I do "reg2inf my.reg /linesonly", it still outputs as a generic INF
Get up to $200 off on hosting from the same people who host this website!

http://www.ryanvm.net/forum/viewtopic.php?t=2357

Return to “Update Pack Addons”

Who is online

Users browsing this forum: No registered users and 4 guests