Jump to content











Photo
- - - - -

offlinereg


  • Please log in to reply
86 replies to this topic

#76 Atari800XL

Atari800XL

    Member

  • Members
  • 91 posts
  •  
    Netherlands

Posted A day ago

Thanks from me as well, very interesting to watch you guys work :-)

I would still be interested in a 64bit version... (gui as well), would be perfect for doing some one-off reg stuff just after apply (WinNTSetup) and before first reboot.

(All tools I use for apply etc. now have 64bit versions, so WOW64 is often not needed)


Edited by Atari800XL, A day ago.


#77 erwan.l

erwan.l

    Gold Member

  • Developer
  • 2131 posts
  • Location:Nantes - France
  •  
    France

Posted A day ago

Thank you all so much - turns out it was because of surrounding it in quotes - doing it without and using ^% works fine

 

Sorry again for initial confusion about using quotes

 

No worries, thanks goes to Misty for his patience and persistence and Wonko to keep us in the right track (i.e before we start doing some crazy stuff) !


  • misty likes this

#78 erwan.l

erwan.l

    Gold Member

  • Developer
  • 2131 posts
  • Location:Nantes - France
  •  
    France

Posted A day ago

Thanks from me as well, very interesting to watch you guys work :-)

I would still be interested in a 64bit version... (gui as well), would be perfect for doing some one-off reg stuff just after apply (WinNTSetup) and before first reboot.

 

I will revive my work this week end although working in 64 bits, for an old fart like me, is a PITA :)

All unicode, pointers are 8 bytes, structures are aligned differently, etc ...



#79 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13933 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted A day ago

On command line, you need to escape BOTH the percentage signs AND the double quotes, i.e.:

echo ^"^%SystemRoot^% and some spaces^"
"%SystemRoot% and some spaces"

Now, for no apparent reason:

@ECHO OFF
SETLOCAL

SET NewHive=TEMPREG.DAT
SET NewKey=Classes\CLSID\{C90250F3-4D7D-4991-9B69-A5C5BC1C2AE6}\InProcServer32
SET NewValue=" "  "%%SystemRoot%%\system32\dataexchange.dll" 2

IF EXIST %NewHive% DEL %NewHive%

SET NeWKeyTAB=%NewKey:\=	%
SET ORcmd=create
CALL :LoopPath %NeWKeyTAB%
SET ORcmd=setvalue
ECHO OfflineReg.exe %NewHive% %ThisPath% %ORcmd% %NewValue% nobackup
OfflineReg.exe %NewHive% %ThisPath% %ORcmd% %NewValue% nobackup
SET ORcmd=enumallvalues
ECHO OfflineReg.exe %NewHive% %ThisPath% %ORcmd%
OfflineReg.exe %NewHive% %ThisPath% %ORcmd%
GOTO :EOF

:LoopPath
SET ThisKey=%1
IF NOT DEFINED ThisPath SET THisPath=%Thiskey%
ECHO OfflineReg.exe %NewHive% %ThisPath% %ORcmd% %ThisKey% nobackup
OfflineReg.exe %NewHive% %ThisPath% %ORcmd% %ThisKey% nobackup
SET ORcmd=createkey
IF %Thispath%.==%ThisKey%. SET Thispath=
SET ThisPath=%ThisPath%\%ThisKey%
IF \.==%ThisPath:~0,1%. SET ThisPath=%ThisPath:~1%
SHIFT
IF %1.==. GOTO :EOF
GOTO :LoopPath

 

 


OfflineReg.exe TEMPREG.DAT Classes create Classes nobackup
createkey Classes ok
saved to TEMPREG.DAT ok
OfflineReg.exe TEMPREG.DAT Classes createkey CLSID nobackup
createkey CLSID ok
saved to TEMPREG.new ok
renamed TEMPREG.DAT to TEMPREG.old
renamed TEMPREG.new to TEMPREG.DAT
OfflineReg.exe TEMPREG.DAT Classes\CLSID createkey {C90250F3-4D7D-4991-9B69-A5C5
BC1C2AE6} nobackup
createkey {C90250F3-4D7D-4991-9B69-A5C5BC1C2AE6} ok
saved to TEMPREG.new ok
renamed TEMPREG.DAT to TEMPREG.old
renamed TEMPREG.new to TEMPREG.DAT
OfflineReg.exe TEMPREG.DAT Classes\CLSID\{C90250F3-4D7D-4991-9B69-A5C5BC1C2AE6}
createkey InProcServer32 nobackup
createkey InProcServer32 ok
saved to TEMPREG.new ok
renamed TEMPREG.DAT to TEMPREG.old
renamed TEMPREG.new to TEMPREG.DAT
OfflineReg.exe TEMPREG.DAT Classes\CLSID\{C90250F3-4D7D-4991-9B69-A5C5BC1C2AE6}\
InProcServer32 setvalue " " "%SystemRoot%\system32\dataexchange.dll" 2 nobackup

setvalue ok
saved to TEMPREG.new ok
renamed TEMPREG.DAT to TEMPREG.old
renamed TEMPREG.new to TEMPREG.DAT
OfflineReg.exe TEMPREG.DAT Classes\CLSID\{C90250F3-4D7D-4991-9B69-A5C5BC1C2AE6}\
InProcServer32 enumallvalues
""=reg_expand_sz:"%SystemRoot%\system32\dataexchange.dll"

:duff:

Wonko


  • misty likes this

#80 misty

misty

    Silver Member

  • Developer
  • 811 posts
  •  
    United Kingdom

Posted A day ago

@Wonko
Finder and Batch Master :worship:

:jaclaz:

Misty

P.s. I've not tested it yet, however to my barely trained eye it looks like it will work through the path and create any required (missing) keys in the path?

#81 misty

misty

    Silver Member

  • Developer
  • 811 posts
  •  
    United Kingdom

Posted A day ago

Thanks for this nice feedback :)

Nice and well deserved.
 

Other unknown commands? 
I recall making a change to allow one to create a hive from scratch (like a BCD for example) : not sure this is known / documented. Example here.

A link I overlooked earlier. Completely forgotten about the Create a windows system from scratch using Linux topic - now that topic was fun too.

Misty

#82 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13933 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted A day ago

P.s. I've not tested it yet, however to my barely trained eye it looks like it will work through the path and create any required (missing) keys in the path?

 

Yep, that's the idea.

Only a quickly put together thing in case of need.

 

@erwan.l

The offlinereg.exe is a bit "verbose" and it is very strict in what it accepts, providing in case of error that often is unclear or misleading,a it would need IMHO some cleanup also in the errors it creates.

 

:duff:

Wonko



#83 misty

misty

    Silver Member

  • Developer
  • 811 posts
  •  
    United Kingdom

Posted 5 hours ago

*
POPULAR

@Erwan.l
As a thank you for all of your hard work on this project I have put together some notes so that you can concentrate on the development side of things. :whistling:

See - http://mistyprojects.../offlinereg.htm. They are in draft at the moment and I haven't fully proofed them, however they may still be useful.

The notes are currently 348 KB when compressed. Which unlike the mammoth TinyPXE guide I put together last year is under the size of the program download package!

:cheers:

Misty

EDIT - the notes are likely to be a work in progress. Whether they can keep pace with your development however is another issue!!!
  • erwan.l, alacran and Atari800XL like this

#84 alacran

alacran

    Silver Member

  • Advanced user
  • 546 posts
  •  
    Mexico

Posted 4 hours ago

@ misty

It seems to me you will have to make a new script because this very good tool is a good candidate to be included on programs on MistyPE project (with all documentation of course to avoid misuse).

alacran

#85 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13933 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 3 hours ago

@Misty

The "nobackup" is NOT a "command", it is an "option", .

 

@erwwan.l

 

In a perfect world the syntax would be more *like*:

COMMAND [OPTION(s)] TARGET PATH InternalCOMMAND_or_VERB [SOURCE|[TYPE] [VALUE]]

 

I.e. (completely fictional example):

1) Offlinereg.exe TEMPREG.DAT "" create <- this creates a new hive with NO named root hive in it, if TEMPREG.DAT already exists gives the error "Registry file already exists"

2) Offlinereg.exe /F TEMPREG.DAT "" create <- this creates a new hive with NO named root hive in it, if TEMPREG.DAT already exists it Forcefully overwrites it

3) Offlinereg.exe TEMPREG.DAT Classes createkey <- this creates a root key in 1) or 2) named Classes, if the key already exists it does nothing, since NO /F command is specified, if the key does not exist then (and only then) it will create the "backup"

4) Offlinereg.exe /F TEMPREG.DAT Classes createkey <- this creates a root key in 1) or 2) named Classes, if the key already exists it does nothing, since  /F command is specified, no "backup" is made

5) Offlinereg.exe TEMPREG.DAT Classes\CLSID createkey <- this creates a root key in 1) or 2) named Classes and in it a key named CLSID, if the key already exists it does nothing, as above

6) Offlinereg.exe TEMPREG.DAT Classes\CLSID{C90250F3-4D7D-4991-9B69-A5C5BC1C2AE6}\InProcServer32 createkey ->as above

7) Offlinereg.exe TEMPREG.DAT Classes\CLSID{C90250F3-4D7D-4991-9B69-A5C5BC1C2AE6}\InProcServer32 createvalue pippo 1 ->as above but also creates a value of TYPE 1 (Reg_SZ) called "pippo" leaving it empty

8) Offlinereg.exe TEMPREG.DAT Classes\CLSID{C90250F3-4D7D-4991-9B69-A5C5BC1C2AE6}\InProcServer32 createvalue pippo 1 pluto ->as above but giving the to the value named "pippo" the actual content "pluto"

9) Offlinereg.exe TEMPREG.DAT Classes\CLSID{C90250F3-4D7D-4991-9B69-A5C5BC1C2AE6}\InProcServer32 setvalue pippo 1 topolinoi-> this will change the value of pippo (only if already existing) to "topolino"

10)Offlinereg.exe TEMPREG.DAT import C:\myfile.reg <- this will import the myfile.reg contents to the root of TEMPREG.DAT

11) Offlinereg.exe TEMPREG.DAT Classes import C:\myfile.reg <- this will import the myfile.reg contents to the "relative path" TEMPREG.DAT\Classes

12) Offlinereg.exe TEMPREG.DAT Classes\CLSID{C90250F3-4D7D-4991-9B69-A5C5BC1C2AE6}\InProcServer32 deletekey ->correspondent to: Example : OfflineReg "c:\temp\system" a_key_path deletekey a_key, but, it as to be decided, if there is no sub-keys it will delete it, otherwise if the option /R is provided it will recursively delete all keys and values under the tree, thus replacing Example : OfflineReg "c:\temp\system" a_key_path deletekeys

etc., these remain the same:

 

Example : OfflineReg "c:\temp\system" a_key_path getvalue a_value_name
Example : OfflineReg "c:\temp\system" a_key_path deletevalue a_value

Example : OfflineReg "c:\temp\system" a_key_path enumkeys <- here a /R (recursive) option may be added (or a /S for analogy with DIR)

 

These may possibly be merged into one by using an option :unsure:
Example : OfflineReg "c:\temp\system" a_key_path enumvalues
Example : OfflineReg "c:\temp\system" a_key_path enumallvalues

 

In practice - besides the "options" that may go BEFORE any other parameter, the actual Internal_command is always the third token, after TARGET and PATH, and BEFORE any other parameter that may (or may not be needed).

 

When working on command line this would IMHO help a lot, and it would be also (again IMHO) more intuitive :dubbio:

 

:duff:

Wonko



#86 erwan.l

erwan.l

    Gold Member

  • Developer
  • 2131 posts
  • Location:Nantes - France
  •  
    France

Posted An hour ago

@Erwan.l
As a thank you for all of your hard work on this project I have put together some notes so that you can concentrate on the development side of things. :whistling:

See - http://mistyprojects.../offlinereg.htm. They are in draft at the moment and I haven't fully proofed them, however they may still be useful.

The notes are currently 348 KB when compressed. Which unlike the mammoth TinyPXE guide I put together last year is under the size of the program download package!

:cheers:

Misty

EDIT - the notes are likely to be a work in progress. Whether they can keep pace with your development however is another issue!!!

 

As always this is really excellent  :hyper:

We make quite a good team as I really suck on documentation :)

And Wonko is never too far away as well to chalenge me on the command line or GUI or to "protect" me from featuritis (tough job for him thus !  :lol:  ).

 

I am going to edit post #1 in this thread to point to this guide.



#87 misty

misty

    Silver Member

  • Developer
  • 811 posts
  •  
    United Kingdom

Posted An hour ago

As always this is really excellent  :hyper:

Thanks.
 

We make quite a good team as I really suck on documentation :)

I agree - that we make a good team, not that you suck at documentation. If you spent your valuable time documenting everything then we'd have a lot less toys to play around with!

 

And Wonko is never too far away as well to chalenge me on the command line or GUI or to "protect" me from featuritis (tough job for him thus !  :lol:  ).

He's a tough taskmaster. :whip: And you are a very unruly pupil :chair:

 

I am going to edit post #1 in this thread to point to this guide.

You are welcome to a host or distribute the documentation yourself - I wrote it for you after all. Just let me know. And give me a few days to proof it properly and maybe add a few more examples.

:cheers:

Misty




8 user(s) are reading this topic

1 members, 7 guests, 0 anonymous users


    ambralivio