Page 1 of 1 1
Topic Options
#207073 - 2013-04-08 12:53 PM Merge A Reg File
Fergieman Offline
Getting the hang of it

Registered: 2010-02-25
Posts: 58
Loc: Ireland
Hi ,

I need to merge a 100 or more Reg key for an internal application we have.
I have the valid exported reg key and I want to run it at logon via my kixtart script but it refuses to run or merge the file even though it says it has imported successfully.
Am I missing something? I can run the same command via a batch file and it works fine.

Shell 'REGEDIT /s "C:\CHANGES.REG" '

Thought this would be pretty easy !

Top
#207075 - 2013-04-08 01:12 PM Re: Merge A Reg File [Re: Fergieman]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4403
Loc: New Jersey
Try something like this:
 Code:
$Cmd = '%COMSPEC% /c 'REGEDIT /s C:\CHANGES.REG'
'About to run ' $Cmd ?   ; debugging message
Shell $Cmd
Also, is this reg file all HKCU content or does it contain some HKLM? If the latter, a regular user may not have permissions to do this.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#207076 - 2013-04-08 01:20 PM Re: Merge A Reg File [Re: Glenn Barnas]
Fergieman Offline
Getting the hang of it

Registered: 2010-02-25
Posts: 58
Loc: Ireland
Thanks Glen

I had considered that - I'll need to double check the reg file.
I'll give your code a go

Top
#207077 - 2013-04-08 01:24 PM Re: Merge A Reg File [Re: Fergieman]
Fergieman Offline
Getting the hang of it

Registered: 2010-02-25
Posts: 58
Loc: Ireland
Nope , that doesnt seem to import the reg key.
Again , like the script I had written , it looks like it has worked but the reg is empty.

Top
#207078 - 2013-04-08 01:26 PM Re: Merge A Reg File [Re: Fergieman]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
Fergieman, most likely the user that is running the scripts does not have the necessary permissions to import the registry keys as Glenn pointed out.
Top
#207079 - 2013-04-08 01:28 PM Re: Merge A Reg File [Re: Arend_]
Fergieman Offline
Getting the hang of it

Registered: 2010-02-25
Posts: 58
Loc: Ireland
Hi , I am running the script under my account which has full admin rights to the pc.
If I manually double click on the reg file and import it works.
I don't want to walk around and do this for 150 pcs !

Top
#207080 - 2013-04-08 01:32 PM Re: Merge A Reg File [Re: Fergieman]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
Ok, leave off the /S switch to see what dialog pops up.
Top
#207081 - 2013-04-08 01:37 PM Re: Merge A Reg File [Re: Arend_]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
Alternatively try this:
 Code:
Shell 'REG IMPORT C:\CHANGES.REG'

Top
#207082 - 2013-04-08 02:00 PM Re: Merge A Reg File [Re: Arend_]
Fergieman Offline
Getting the hang of it

Registered: 2010-02-25
Posts: 58
Loc: Ireland
ahhhhhhhhhhhhhhhhhhhhhhhhhhh
Top
#207083 - 2013-04-08 02:01 PM Re: Merge A Reg File [Re: Fergieman]
Fergieman Offline
Getting the hang of it

Registered: 2010-02-25
Posts: 58
Loc: Ireland
how annoying......I got it sorted.
I'm using a virtual sequenced scripter app which must be running under a system account when lauching. Once I saved the file and ran the file through dos it imported the reg file !!

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.067 seconds in which 0.029 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org