Importing Runonce key

Antworten
loggenk
Beiträge: 163
Registriert: 15 Nov 2012, 17:34

Importing Runonce key

Beitrag von loggenk »

[quote][/quote]Hi All,

I have a problem importing a registry key. In the installationscript i used : regedit /s "%scriptpath%\test365.reg"
I also copied regedit.exe to the CLIENT_DATA folder.
The error log is telling me that all went well. But the runonce key never appears in the registry!

Can somebody tell me whats wrong with it?

With regards,

Kees...
Benutzeravatar
d.oertel
uib-Team
Beiträge: 3319
Registriert: 04 Jun 2008, 14:27

Re: Importing Runonce key

Beitrag von d.oertel »

Hi,

regedit do not will tell us what he/she is doing.

so try to let opsi-winst do the job because here you will fin a lot of information in the log file.

Code: Alles auswählen

Registry loadUnicodeTextFile(<.reg file>) /regedit
regards

d.oertel
opsi support - uib gmbh

For productive opsi installations we recommend support contracts.
http://www.uib.de
http://www.opsi.org
loggenk
Beiträge: 163
Registriert: 15 Nov 2012, 17:34

Re: Importing Runonce key

Beitrag von loggenk »

Hi Thanks for your quick.

I'm sorry, tjis also doesn't work.

The log is telling me...

[5] [15-11-2012 18:15:56] Execution of Files_Copy
[6] [15-11-2012 18:15:56] Copying O:\install\office365update\O365Update.exe -----> C:\tmp
[5] [15-11-2012 18:15:56] 1 File(s) found
[6] [15-11-2012 18:15:56] Source O:\install\office365update\O365Update.exe
[6] [15-11-2012 18:15:56] Info: Target C:\tmp\O365Update.exe exists and shall be overwritten
[6] [15-11-2012 18:16:08] O:\install\office365update\O365Update.exe copied to C:\tmp\
[5] [15-11-2012 18:16:08] 1 File(s) treated
[5] [15-11-2012 18:16:08]
[5] [15-11-2012 18:16:08] Execution of Winbatch_produkt_silent_install
[6] [15-11-2012 18:16:08] Call "Registry loadUnicodeTextFile(test.reg) /regedit"
[6] [15-11-2012 18:16:08] Waiting until the called process is finished
[6] [15-11-2012 18:16:08]
[1] [15-11-2012 18:16:08] ___________________
[1] [15-11-2012 18:16:08] script finished
[1] [15-11-2012 18:16:08] 0 errors
[1] [15-11-2012 18:16:08] 0 warnings

ANy ideas?

Greetings,

Kees...
loggenk
Beiträge: 163
Registriert: 15 Nov 2012, 17:34

Re: Importing Runonce key

Beitrag von loggenk »

This is the script:

[Initial]
Message=Installiere Updates für Office365
StayOnTop=true

[Aktionen]
Files_Copy
Winbatch_produkt_silent_install

[Files_Copy]
copy "%scriptpath%\O365Update.exe" "c:\tmp"

[Winbatch_produkt_silent_install]
Registry loadUnicodeTextFile(test.reg) /regedit
Benutzeravatar
d.oertel
uib-Team
Beiträge: 3319
Registriert: 04 Jun 2008, 14:27

Re: Importing Runonce key

Beitrag von d.oertel »

Hi,

try

Code: Alles auswählen

[Aktionen]
setloglevel = 7
Files_Copy
Registry loadUnicodeTextFile(test.reg) /regedit

[Files_Copy]
copy "%scriptpath%\O365Update.exe" "c:\tmp"
regards

d.oertel
opsi support - uib gmbh

For productive opsi installations we recommend support contracts.
http://www.uib.de
http://www.opsi.org
loggenk
Beiträge: 163
Registriert: 15 Nov 2012, 17:34

Re: Importing Runonce key

Beitrag von loggenk »

Hi, works fine on 32 bits systems.
However, on 64 bits systems there is a 32 bit redirection.

Is it possible to place the registry key on the correct location?
For example hklm\software\ProductX ?
On 64bits systems the key is placed in HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node

Thanks in advance,

Kees....
Zakyl
Beiträge: 68
Registriert: 16 Okt 2012, 11:03

Re: Importing Runonce key

Beitrag von Zakyl »

You can test your OS version before install it. After it, with "if" you can put your registry key where you want (if 32 put it there "location1", if 64 put it there "location2")

Something like that : (you need to modify it)

Set $INST_SystemType$ = GetSystemType
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")

if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
Message "Installation de " + $ProductId$+" (32 Bit)"
comment "Start setup program"
;Here redirection to "winbatch_install_32"
Winbatch_install_32
Sub_check_exitcode
endif

if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
Message "Installation de " + $ProductId$+" (64 Bit)"
comment "Start setup program"
; Here redirection to winbatch_install_64
Winbatch_install_64
Sub_check_exitcode
endif
Antworten