Jump to content











Photo
- - - - -

offlinereg


  • Please log in to reply
295 replies to this topic

#76 Atari800XL

Atari800XL

    Frequent Member

  • Advanced user
  • 115 posts
  •  
    Netherlands

Posted 22 January 2018 - 08:12 PM

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, 22 January 2018 - 08:14 PM.


#77 erwan.l

erwan.l

    Platinum Member

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

Posted 22 January 2018 - 08:13 PM

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

    Platinum Member

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

Posted 22 January 2018 - 08:14 PM

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
  • 15108 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 22 January 2018 - 08:30 PM

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

    Gold Member

  • Developer
  • 1033 posts
  •  
    United Kingdom

Posted 22 January 2018 - 08:37 PM

@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

    Gold Member

  • Developer
  • 1033 posts
  •  
    United Kingdom

Posted 22 January 2018 - 08:58 PM

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
  • 15108 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 22 January 2018 - 09:03 PM

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

    Gold Member

  • Developer
  • 1033 posts
  •  
    United Kingdom

Posted 23 January 2018 - 06:13 PM

*
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

    Gold Member

  • .script developer
  • 1181 posts
  •  
    Mexico

Posted 23 January 2018 - 07:05 PM

@ 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

 

EDIT: Never mind, just downloaded and saw it is portable, so no need for an Script to add offlinereg to WinPE's


Edited by alacran, 24 January 2018 - 03:01 AM.


#85 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 23 January 2018 - 07:32 PM

@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

    Platinum Member

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

Posted 23 January 2018 - 09:24 PM

@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

    Gold Member

  • Developer
  • 1033 posts
  •  
    United Kingdom

Posted 23 January 2018 - 09:34 PM

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

#88 erwan.l

erwan.l

    Platinum Member

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

Posted 24 January 2018 - 11:37 AM

Latest version support multi level path when using createkey or setvalue.

This change does not apply yet to the "import" feature (see post here).

 

That should simplify significantly scripting/batching and possibly supersede Wonko's batch here.

Nevertheless, I am always hugely impressed by Wonko's batching skills : an art which is disappearing these days.

 

Example below.

rem create an empty hive
offlinereg.exe c:\temp\hive.dat " " create
rem create a string value named NewValue, containing "somevalue" under new path ControlSet001\a\b
offlinereg.exe c:\temp\hive.dat ControlSet001\a\b setvalue Newvalue somevalue nobackup
rem create a key named NewKey under new path ControlSet001\c\d
offlinereg.exe c:\temp\hive.dat ControlSet001\c\d createkey NewKey nobackup


#89 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 24 January 2018 - 12:07 PM

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:

 

Of course I beg to disagree , I prefer to consider you both not as pupils, but rather as members of a team, actually friends (that - sometimes - need to be shown the path or that - from time to time - need to be shocked a little bit to re-focus their attention when they go accidentally out of the path following some squirrel passing by).

 

And this allows me to say with confidence how this obviously represents not a point of arrival, but a mere point of departure, the beginning of your new public life,....still, I see that your attitude is the right one, which gives me reason for faith in the future of your new accomplishments.

 

:duff:

Wonko



#90 misty

misty

    Gold Member

  • Developer
  • 1033 posts
  •  
    United Kingdom

Posted 24 January 2018 - 01:11 PM

@Erwan.l

Latest version support multi level path when using createkey or setvalue.
This change does not apply yet to the "import" feature (see post here).

That should simplify significantly scripting/batching and possibly supersede Wonko's batch here.....

:thumbsup: Great news and a very welcome new feature. I'll try and update the guide tomorrow as I have other commitments today.

Now Erwan, whilst this new feature is a great addition, in other areas your development is going backwards.

Previous release -


OfflineReg v0.9.9 by Erwan.L - http://erwan.labalec.fr/ - erwan2212@gmail.fr
New release -
OfflineReg v0.9.8 by Erwan.L - http://erwan.labalec.fr/ - erwan2212@gmail.fr
:lol:

Misty

EDIT - forgot to mention that I did a quick test of the new nested keys feature before posting. It works great in a batch file :thumbsup:

#91 misty

misty

    Gold Member

  • Developer
  • 1033 posts
  •  
    United Kingdom

Posted 24 January 2018 - 01:14 PM

...from time to time - need to be shocked a little bit to re-focus their attention when they go accidentally out of the path following some squirrel passing by)....


It takes a bit more than a bloody squirrel to distract me. Now a useful program on the other hand is almost certain to distract 99% of the time :whistling:

#92 erwan.l

erwan.l

    Platinum Member

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

Posted 24 January 2018 - 01:32 PM

I confess, I am easily distracted by squirrels :)

 

c0d0ab3b033f5d6196df6533745bffc8.jpg



#93 erwan.l

erwan.l

    Platinum Member

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

Posted 24 January 2018 - 04:31 PM

@Erwan.l
:thumbsup: Great news and a very welcome new feature. I'll try and update the guide tomorrow as I have other commitments today.

Now Erwan, whilst this new feature is a great addition, in other areas your development is going backwards.

Previous release -

 

OfflineReg v0.9.9 by Erwan.L - http://erwan.labalec.fr/ - erwan2212@gmail.fr
New release -
OfflineReg v0.9.8 by Erwan.L - http://erwan.labalec.fr/ - erwan2212@gmail.fr
:lol:

Misty

EDIT - forgot to mention that I did a quick test of the new nested keys feature before posting. It works great in a batch file :thumbsup:

 

 

I thought that once I reached 0.9.9 I would restart counter clockwise ....

Ok OK bad idea :)

 

Fixed...



#94 erwan.l

erwan.l

    Platinum Member

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

Posted 24 January 2018 - 04:33 PM

@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

 

Reading thru it.

 

Cannot guarantee a squirrel will not pass by thus ! 



#95 erwan.l

erwan.l

    Platinum Member

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

Posted 24 January 2018 - 04:43 PM

 

@erwwan.l

 

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

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

 

:duff:

Wonko

 

Just sharing how I deal with the command line for now : my parameters have fixed positions.

Many of your use cases are actually covered today.

I need to test them one by one.

if paramcount>=3 then
begin
ghive :=paramstr(1); //target
gkeyname:=paramstr(2); //path
gverb:=paramstr(3);   //command
if paramcount>=4 then gvaluename :=string(paramstr(4)); //self explanatory
if paramcount>=5 then gvalue:=string(paramstr(5)); //self explanatory
if paramcount>=6 then gvaluetype:=strtoint(paramstr(6)); //self explanatory
for i:=1 to ParamCount doif lowercase(paramstr(i))='nobackup' then nobackup:=true else nobackup:=false;
main(ghive,gkeyname,gverb,gvaluename,gvalue,gvaluetype,nobackup);
end;


#96 erwan.l

erwan.l

    Platinum Member

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

Posted 24 January 2018 - 05:49 PM

@Wonko, I have uploaded a new version and tested/commented the below cases (I purposedly avoided the [options] ones).

1/Offlinereg.exe TEMPREG.DAT " " create
works as is
3/Offlinereg.exe TEMPREG.DAT Classes createkey
works with latest version
5/Offlinereg.exe TEMPREG.DAT Classes\CLSID createkey
works with latest version
6/Offlinereg.exe TEMPREG.DAT Classes\CLSID{C90250F3-4D7D-4991-9B69-A5C5BC1C2AE6}\InProcServer32 createkey
works with latest version
7/Offlinereg.exe TEMPREG.DAT Classes\CLSID{C90250F3-4D7D-4991-9B69-A5C5BC1C2AE6}\InProcServer32 createvalue pippo 1
  suggest for now->Offlinereg.exe TEMPREG.DAT Classes\CLSID{C90250F3-4D7D-4991-9B69-A5C5BC1C2AE6}\InProcServer32 setvalue pippo " " 1
8/Offlinereg.exe TEMPREG.DAT Classes\CLSID{C90250F3-4D7D-4991-9B69-A5C5BC1C2AE6}\InProcServer32 createvalue pippo 1 pluto  
  suggest for now->Offlinereg.exe TEMPREG.DAT Classes\CLSID{C90250F3-4D7D-4991-9B69-A5C5BC1C2AE6}\InProcServer32 setvalue pippo pluto 1
9/Offlinereg.exe TEMPREG.DAT Classes\CLSID{C90250F3-4D7D-4991-9B69-A5C5BC1C2AE6}\InProcServer32 setvalue pippo 1 topolinoi
  suggest for now->Offlinereg.exe TEMPREG.DAT Classes\CLSID{C90250F3-4D7D-4991-9B69-A5C5BC1C2AE6}\InProcServer32 setvalue pippo topolinoi 1
10/Offlinereg.exe TEMPREG.DAT import C:\myfile.reg <- this will import the myfile.reg contents to the root of TEMPREG.DAT
works as is
11/Offlinereg.exe TEMPREG.DAT Classes import C:\myfile.reg <- this will import the myfile.reg contents to the "relative path" TEMPREG.DAT\Classes
need some extra code
12/Offlinereg.exe TEMPREG.DAT Classes\CLSID{C90250F3-4D7D-4991-9B69-A5C5BC1C2AE6}\InProcServer32 deletekey
works with latest version (not subkeys in which case you need to use deletekeys)


#97 erwan.l

erwan.l

    Platinum Member

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

Posted 24 January 2018 - 05:59 PM

@Wonko, the below will also work

Offlinereg.exe TEMPREG.DAT Classes\CLSID{C90250F3-4D7D-4991-9B69-A5C5BC1C2AE6}\InProcServer32 createkey " " nobackup
Offlinereg.exe TEMPREG.DAT Classes\CLSID{C90250F3-4D7D-4991-9B69-A5C5BC1C2AE6}\InProcServer32 deletekey " " nobackup



#98 erwan.l

erwan.l

    Platinum Member

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

Posted 24 January 2018 - 06:02 PM

@Misty : I did not do it, Wonko made me do it :)

 

Looks like you may have to review your documentation  :ph34r:



#99 misty

misty

    Gold Member

  • Developer
  • 1033 posts
  •  
    United Kingdom

Posted 24 January 2018 - 06:50 PM

@Misty : I did not do it, Wonko made me do it :)
 
Looks like you may have to review your documentation  :ph34r:


:argue: :frusty: :ranting2:

It's not your fault Erwan. I blame Wonko

Misty

P.s. Should I wait a few days until development calms down? It's hard for me to hit a moving target!!!!

#100 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 24 January 2018 - 07:05 PM

Yep, the good thing about "options" *like* /F or /Force, /S, /R or /Recursive or similar is that:
1) the first character is always / (but if you prefer or like more the Linux or grub4dos style of the prefix -- it is OK, though not as "foolproof" as /, see point #2 below)
2) if they are put - by design - at the beginning of the command line, you simply SHIFT the tokens until you find the FIRST occurrence NOT preceded by / (or by --), since the actual TARGET is NEEDED anyway, and since the TARGET - by definition - cannot start with / on Windows this allows to surely find the TARGET, making it the "token 1" 
 
 
The change from setvalue to createvalue is only semantics, if you have createkey (which at the end of the day is very similar to MD or MKDIR) it would be logical to have createvalue as well.
Idea  :idea: you could make an internal alias, so that setvalue and createvalue end up in the same command.
The more "purists" will use createvalue when the value does not exist and setvalue if they need to change the actual value of an existing value.
 
About the order of the "[SOURCE|[TYPE] [VALUE]]" it is perfectly OK  :thumbsup:  to have it to "[SOURCE|[VALUE][TYPE]]", putting the TYPE between SOURCE and VALUE would have provided (since it is a single digit) a more visual separator, but it is not an issue at all, which remains the "nobackup" at the end.
 
Imagine that you have to create/set a number of values under the same key, current syntax:
#1 Offlinereg.exe TEMPREG.DAT Classes\CLSID{C90250F3-4D7D-4991-9B69-A5C5BC1C2AE6}\InProcServer32 setvalue pippo1 pluto1 1 nobackup
#2 Offlinereg.exe TEMPREG.DAT Classes\CLSID{C90250F3-4D7D-4991-9B69-A5C5BC1C2AE6}\InProcServer32 setvalue pippo2 pluto2 1 nobackup
 
For going to #1 to #2 you have key presses:
1 key press up-arrow
19 key presses backspace
19 key presses to type "2 pluto2 1 nobackup"
Total 39 key presses,
to be compared with (hypothetical):
 
#1 Offlinereg.exe /F TEMPREG.DAT Classes\CLSID{C90250F3-4D7D-4991-9B69-A5C5BC1C2AE6}\InProcServer32 setvalue pippo1 pluto1 1
#2 Offlinereg.exe /F TEMPREG.DAT Classes\CLSID{C90250F3-4D7D-4991-9B69-A5C5BC1C2AE6}\InProcServer32 setvalue pippo2 pluto2 1
1 key press up-arrow
10 key presses backspace
10 key presses to type "2 pluto2 1"
Total 21 key presses, and more than that no risk to mistype[1] "nobackup"
 

P.s. Should I wait a few days until development calms down? It's hard for me to hit a moving target!!!!

Sure, that is exactly the reason why those bloody squirrels move so d@mn fast ;).

You like an easy win, don't you?
 
Publicity:

 
 
:duff:
Wonko
 
 
 
 
[1] Disclaimer:any reference to existing people, and/or their names, projects, copyrights or trademarks is purely concidental




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users