Jump to content











Photo
- - - - -

offlinereg


  • Please log in to reply
295 replies to this topic

#251 osfixer

osfixer

    Member

  • Validating
  • 35 posts
  •  
    United Kingdom

Posted 12 March 2019 - 02:14 PM

Heh. You want me to donate or something?

Or maybe you should opensource it so someone else can fix it.

 

Just my honest opinion.


Edited by osfixer, 12 March 2019 - 02:14 PM.


#252 erwan.l

erwan.l

    Platinum Member

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

Posted 12 March 2019 - 04:00 PM

Heh. You want me to donate or something?

Or maybe you should opensource it so someone else can fix it.

 

Just my honest opinion.

 

I dont need money nor am I asking for it.

Lots of my softwares are open source (on github).

The parts not open sourced are the ones which are not clean enough to be shared.

 

Just saying that the update/fix will come when I have spare time for it.



#253 osfixer

osfixer

    Member

  • Validating
  • 35 posts
  •  
    United Kingdom

Posted 13 March 2019 - 01:25 PM

Well I already gave you an idea how to fix it..



#254 erwan.l

erwan.l

    Platinum Member

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

Posted 13 March 2019 - 07:58 PM

Deleting a key with values work in current version

I need to test the same but this time with sub keys.

C:\Users\erwan\Documents\-= SOURCES =-\delphi\system\offlinereg>offlinereg-win64.exe temp " " import test.reg
[titi]
[toto]
added -> Testval2=string:test1
added -> Testval1=string:test2
[Microsoft\Windows\CurrentVersion\Explorer]
added -> DelaySendToMenuBuild=dword:1
added -> HubMode=dword:1
saved to temp ok

C:\Users\erwan\Documents\-= SOURCES =-\delphi\system\offlinereg>offlinereg-win64.exe temp " " import test3.reg
[-toto]
deletekey:toto
saved to temp ok


#255 osfixer

osfixer

    Member

  • Validating
  • 35 posts
  •  
    United Kingdom

Posted 13 March 2019 - 07:59 PM

Very good!!! 



#256 erwan.l

erwan.l

    Platinum Member

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

Posted 13 March 2019 - 08:06 PM

ok, error reproduced on my side when key has subkeys.

offlinereg-win64.exe temp " " import test3.reg
[-toto]
deletekey:toto
ORDeleteKey failed:1020:Impossible de créer un lien symbolique dans une clé du Registre qui a déjà des sous-clés ou des
valeurs.

saved to temp ok


#257 osfixer

osfixer

    Member

  • Validating
  • 35 posts
  •  
    United Kingdom

Posted 13 March 2019 - 08:07 PM

You use Delphi or FPC? :))



#258 erwan.l

erwan.l

    Platinum Member

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

Posted 13 March 2019 - 08:16 PM

You use Delphi or FPC? :))

 

FPC whenever possible.

Delphi 7 for my oldest softwares (too much efforts to convert to FPC).



#259 osfixer

osfixer

    Member

  • Validating
  • 35 posts
  •  
    United Kingdom

Posted 13 March 2019 - 08:22 PM

I used it in the past a lot, but have since moved on to C/C++.

Still maintain my old legacy code with FPC which has some more features.


Edited by osfixer, 13 March 2019 - 08:22 PM.


#260 erwan.l

erwan.l

    Platinum Member

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

Posted 13 March 2019 - 08:27 PM

new zip uploaded.

 

deleting a key and its sub keys (if any) should now work in import mode.

 

quick and dirty :)

if key[1]='-'
     then
     begin
     delete(key,1,1);
     writeln('deletekey:'+key);
     //are there any sbkeys?
     ret:=OROpenKey (hkey,pwidechar(widestring(key)),hkresult);
     if ret=0 then
       begin
       deletekeys (hkresult);
       ORcloseKey (hkresult);
       end;
     deletekey (hkey,key);
     end
     else if key[1]<>';' then createkeys(hkey,key); //for section create the multi level path key 


#261 osfixer

osfixer

    Member

  • Validating
  • 35 posts
  •  
    United Kingdom

Posted 13 March 2019 - 08:44 PM

Try this, it seems to give problems. It will not remove it if there are some empty subkeys?

 

 offlinereg-win64.exe "NTUSER.DAT" " " import test.reg

Windows Registry Editor Version 5.00

[-HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\CloudStore\Store\Cache\DefaultAccount]
 

Edited by osfixer, 13 March 2019 - 08:51 PM.


#262 erwan.l

erwan.l

    Platinum Member

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

Posted 13 March 2019 - 08:54 PM

looks ok to me.

offlinereg-win64.exe temp " " import test4.reg
[-SOFTWARE\Microsoft\Windows\CurrentVersion\CloudStore\Store\Cache\DefaultAccount]
deletekey:SOFTWARE\Microsoft\Windows\CurrentVersion\CloudStore\Store\Cache\DefaultAccount
saved to temp ok

offlinereg-win64.exe temp " " import test4.reg
[-SOFTWARE\Microsoft\Windows\CurrentVersion\CloudStore\Store\Cache\DefaultAccount]
deletekey:SOFTWARE\Microsoft\Windows\CurrentVersion\CloudStore\Store\Cache\DefaultAccount
ORDeleteKey failed:2:Le fichier spécifié est introuvable.

saved to temp ok


#263 osfixer

osfixer

    Member

  • Validating
  • 35 posts
  •  
    United Kingdom

Posted 13 March 2019 - 08:57 PM

Examine result with offline reg GUI tool. It seems there are still leftovers.



#264 erwan.l

erwan.l

    Platinum Member

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

Posted 13 March 2019 - 08:59 PM

Examine result with offline reg GUI tool. It seems there are still leftovers.

 

good catch !

will look at it ... tomorrow :)

 

long day, i need to "chill and netflix".



#265 osfixer

osfixer

    Member

  • Validating
  • 35 posts
  •  
    United Kingdom

Posted 13 March 2019 - 09:00 PM

Yes thanks! :)))

 

Enjoy!



#266 osfixer

osfixer

    Member

  • Validating
  • 35 posts
  •  
    United Kingdom

Posted 14 March 2019 - 06:13 PM

Can you verify this?

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Control Panel\Desktop]
"ForegroundLockTimeout"=dword:00000000 ; this comment will make it fail

Edited by osfixer, 14 March 2019 - 06:13 PM.


#267 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 14 March 2019 - 07:52 PM

 

Can you verify this?





Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Control Panel\Desktop]
"ForegroundLockTimeout"=dword:00000000 ; this comment will make it fail

 

Are you sure-sure that regedit.exe and/or reg.exe supports "inline" comments, AFAICR the ; could only be used as first character of a new line to indicate that the whole line is a comment.

 

Or maybe that has changed in the newer MS OS's? :w00t: :ph34r:

 

:duff:

Wonko



#268 osfixer

osfixer

    Member

  • Validating
  • 35 posts
  •  
    United Kingdom

Posted 14 March 2019 - 07:55 PM

Yes it does support. Verify with reg import.


Edited by osfixer, 14 March 2019 - 07:55 PM.


#269 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 14 March 2019 - 08:14 PM

Yes it does support. Verify with reg import.

 

Hmmmm. :unsure:

 

I have no way to test here right now, but that would mean that you need to escape semicolon if you really want to add it to a registry entry? :dubbio:

Scrap that, text is inside double quotes in .reg files.  :blush:

 

:duff:

Wonko



#270 osfixer

osfixer

    Member

  • Validating
  • 35 posts
  •  
    United Kingdom

Posted 14 March 2019 - 08:30 PM

:))))



#271 osfixer

osfixer

    Member

  • Validating
  • 35 posts
  •  
    United Kingdom

Posted 14 March 2019 - 11:15 PM

Found another bug (?)

Seems like it can't add empty string values?

E:\Hive>offlinereg-win64.exe "NTUSER.DAT" " " import test.reg
[SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]
main error:Access violation
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders]
"{1B3EA5DC-B587-4786-B4EF-BD1DC332AEAE}"=""
"{00BCFC5A-ED94-4E48-96A1-3F6217F21990}"=""
"{7D1D3A04-DEBB-4115-95CF-2F29DA2920DA}"=""
"{56784854-C6CB-462B-8169-88E350ACB882}"=""
"{374DE290-123F-4565-9164-39C4925E467B}"=""
"{A520A1A4-1780-4FF6-BD18-167343C5AF16}"=""
"{BFB9D5E0-C6A9-404C-B2B2-AE6DB6AF4968}"=""
"{4C5C32FF-BB9D-43B0-B5B4-2D72E54EAAA4}"=""
"CD Burning"=""
"My Pictures"=""
"Templates"=""
"PrintHood"=""
"Favorites"=""
"My Music"=""
"Personal"=""
"My Video"=""
"Startup"=""
"Cookies"=""
"History"=""
"NetHood"=""
"Recent"=""
"Cache"=""

Edited by osfixer, 14 March 2019 - 11:16 PM.


#272 osfixer

osfixer

    Member

  • Validating
  • 35 posts
  •  
    United Kingdom

Posted 17 March 2019 - 07:54 AM

Found new bug (?)

It adds duplicate entries..

E:\Hive>offlinereg-win64 "H:\Windows\System32\config\SOFTWARE" " " import wip_software.reg

[Microsoft\Windows NT\CurrentVersion\ProfileList]
added -> Public=string:
[Microsoft\Windows\CurrentVersion\Policies\Explorer]
added -> AllowFileCLSIDJunctions=dword:0
[Microsoft\Windows\CurrentVersion\Policies\Explorer]
added -> AllowFileCLSIDJunctions=dword:0
saved to H:\Windows\System32\config\SOFTWARE ok
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList]
"Public"=" "

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"AllowFileCLSIDJunctions"=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"PreventItemCreationInUsersFilesFolder"=dword:00000001
"UseDefaultTile"=dword:00000001


#273 erwan.l

erwan.l

    Platinum Member

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

Posted 17 March 2019 - 02:46 PM

new version.

 

side note : the import function is not there to compete with the reg.exe (batch) import function so i am not sure if i will keep on tshooting/fixing any bug here for long.

 

indeed, there are other ways to import datas using offlinereg and overall, i want to believe offlinereg added value is elsewhere.

 

for anyone looking for a perfect import feature, i strongly recommend using reg.exe import feature.

fixed : import, comments aka ';' will be ignored 
added : import, will support '-' for keys or values
fixed : import, will delete sub keys when using '-' 
fixed : import, will import null "" correctly
fixed : import, comments aka ';' will be ignored at end of line

  • Atari800XL likes this

#274 erwan.l

erwan.l

    Platinum Member

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

Posted 17 March 2019 - 02:57 PM

 

Found new bug (?)

It adds duplicate entries..

E:\Hive>offlinereg-win64 "H:\Windows\System32\config\SOFTWARE" " " import wip_software.reg

[Microsoft\Windows NT\CurrentVersion\ProfileList]
added -> Public=string:
[Microsoft\Windows\CurrentVersion\Policies\Explorer]
added -> AllowFileCLSIDJunctions=dword:0
[Microsoft\Windows\CurrentVersion\Policies\Explorer]
added -> AllowFileCLSIDJunctions=dword:0
saved to H:\Windows\System32\config\SOFTWARE ok
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList]
"Public"=" "

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"AllowFileCLSIDJunctions"=dword:00000000

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"PreventItemCreationInUsersFilesFolder"=dword:00000001
"UseDefaultTile"=dword:00000001

 

My code consider each [a\b\c] as a (unique section).

 

If there happens to be two [a\b\c] then the last one will be ignored.

 

Syntaxically speaking i would say this reg file is wrong.

 

Reg.exe import may be ok with it ... but offlinereg will not be ok with it.

 

I will not work on this one (whether a bug or missing logic to handle possibly improper reg file).

"Best" case scenario, I can possibly avoid creating a duplicate entries but will not be able to acknowledge the second [a\b\c] occurence.



#275 osfixer

osfixer

    Member

  • Validating
  • 35 posts
  •  
    United Kingdom

Posted 17 March 2019 - 03:02 PM

Excellent! If i spot new i will report! IMHO basic functionality should work!






2 user(s) are reading this topic

1 members, 1 guests, 0 anonymous users


    alacran