Registry Anpassung wird nicht übernommen (gelöst)

Antworten
maxi_ybl
Beiträge: 15
Registriert: 29 Dez 2022, 14:34

Registry Anpassung wird nicht übernommen (gelöst)

Beitrag von maxi_ybl »

Moin,

für eine Software muss bei uns in der Reg zur Kontaktaufnahme mit einem Server eine Anpassung gemacht werden. Mit der Reg funktion im OpsiScript selbst funktionierte das nicht ganz wegen eines Leerzeichens.
Deswegen hab ich eine .reg Datei und eine .bat Datei erstellt, welche erst in C:\Temp kopiert werden sollen und dann mit DosinAnIcon ausgeführt.

Das Opsi Script:

Code: Alles auswählen

[Actions]
requiredOpsiscriptVersion >= "4.12.4.23"
;---- Kopiert die Batchdatei und die Regedit Datei nach C:\Temp\Files
Files_install
;---- Rufft die Batchauf 
DosInAnIcon_Reg


[Files_install]

copy -s "%ScriptPath%\Files1\*.*" "C:\temp\files"

[DosInAnIcon_Reg]
"C:\temp\files\Opentouchregy.bat"
Die Batch:
reg import C:\temp\files\Opentouchreg.reg


Wenn ich die Batch oder Reg manuell oder übers CMD ausführe funktioniert alles und ich bekomme die selbe Rückmeldung wie im Opsi Log.

Opsi Log:
[6] [2023-09-20 12:34:42.520] [opentouchregedit] Copying p:\opentouchregedit\Files1\*.* -----> C:\temp\files
[6] [2023-09-20 12:34:42.520] [opentouchregedit] 2 File(s) found
[7] [2023-09-20 12:34:42.524] [opentouchregedit] Source p:\opentouchregedit\Files1\Opentouchreg.reg
[6] [2023-09-20 12:34:42.530] [opentouchregedit] copy: p:\opentouchregedit\Files1\Opentouchreg.reg copied to C:\temp\files\
[7] [2023-09-20 12:34:42.531] [opentouchregedit] Source p:\opentouchregedit\Files1\Opentouchregy.bat
[6] [2023-09-20 12:34:42.544] [opentouchregedit] copy: p:\opentouchregedit\Files1\Opentouchregy.bat copied to C:\temp\files\
[6] [2023-09-20 12:34:42.546] [opentouchregedit] 2 File(s) treated
[5] [2023-09-20 12:34:42.549] [opentouchregedit] Finished section: Files_install
[5] [2023-09-20 12:34:42.549] [opentouchregedit] Execution of: DosInAnIcon_Reg
[7] [2023-09-20 12:34:42.553] [opentouchregedit] Save to file with encoding: system
[7] [2023-09-20 12:34:42.554] [opentouchregedit] Executing "C:\Windows\system32\\cmd.exe" /C c:\opsi.org\tmp\_opsiscript_U947tg9nVS.cmd
[6] [2023-09-20 12:34:42.554] [opentouchregedit] Start process as invoker: SYSTEM
[6] [2023-09-20 12:34:42.559] [opentouchregedit] Started process "C:\Windows\system32\\cmd.exe" with Opt: /C\r\nc:\opsi.org\tmp\_opsiscript_U947tg9nVS.cmd
[7] [2023-09-20 12:34:42.695] [opentouchregedit]
[7] [2023-09-20 12:34:42.695] [opentouchregedit] output:
[7] [2023-09-20 12:34:42.695] [opentouchregedit] --------------
[7] [2023-09-20 12:34:42.695] [opentouchregedit]
[7] [2023-09-20 12:34:42.695] [opentouchregedit] C:\Windows\system32>"C:\temp\files\Opentouchregy.bat"
[7] [2023-09-20 12:34:42.695] [opentouchregedit]
[7] [2023-09-20 12:34:42.695] [opentouchregedit] C:\Windows\system32>reg import C:\temp\files\Opentouchreg.reg
[7] [2023-09-20 12:34:42.695] [opentouchregedit] Der Vorgang wurde erfolgreich beendet.
[7] [2023-09-20 12:34:42.695] [opentouchregedit]
[7] [2023-09-20 12:34:42.695] [opentouchregedit]
[7] [2023-09-20 12:34:42.700] [opentouchregedit] The file: c:\opsi.org\tmp\_opsiscript_U947tg9nVS.cmd has been deleted
[6] [2023-09-20 12:34:42.700] [opentouchregedit] Search "c:\opsi.org\tmp\_opsiscript_*"
[1] [2023-09-20 12:34:42.704] [opentouchregedit] ___________________
[1] [2023-09-20 12:34:42.704] [opentouchregedit] script finished: success
[1] [2023-09-20 12:34:42.704] [opentouchregedit] 0 errors
[1] [2023-09-20 12:34:42.704] [opentouchregedit] 0 warnings

Ich verstehe nicht ganz wieso der Output ist "Der Vorgang wurde erfolgreich beendet" genauso wie wenn es manuell ausgeführt wird, aber keine Änderung statt findet in der Registry
Zuletzt geändert von maxi_ybl am 19 Okt 2023, 12:20, insgesamt 2-mal geändert.
Jan.Schmidt
Beiträge: 439
Registriert: 08 Jul 2017, 12:02

Re: Registry Anpassung wird nicht übernommen

Beitrag von Jan.Schmidt »

Ich verstehe nicht ganz wieso der Output ist "Der Vorgang wurde erfolgreich beendet" genauso wie wenn es manuell ausgeführt wird, aber keine Änderung statt findet in der Registry
Hi,

könnte es sein, dass in der reg irgendwas drinsteht, das mit hkcu beginnt?
Vermutlich Ja.
Benutzeravatar
SisterOfMercy
Beiträge: 1524
Registriert: 22 Jun 2012, 19:18

Re: Registry Anpassung wird nicht übernommen

Beitrag von SisterOfMercy »

maxi_ybl hat geschrieben: 20 Sep 2023, 12:52 für eine Software muss bei uns in der Reg zur Kontaktaufnahme mit einem Server eine Anpassung gemacht werden. Mit der Reg funktion im OpsiScript selbst funktionierte das nicht ganz wegen eines Leerzeichens.
Why don't you use the registry function? Like a registry_install call in the primary section?
What registry setting are you trying to change?
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
maxi_ybl
Beiträge: 15
Registriert: 29 Dez 2022, 14:34

Re: Registry Anpassung wird nicht übernommen

Beitrag von maxi_ybl »

Ohh sorry
the Problem does not exist anymore.

My Solution was to use a batch with a reg import command

Also i had to Copy some diged in Files for it to work without problems
So this topic is solved
Benutzeravatar
SisterOfMercy
Beiträge: 1524
Registriert: 22 Jun 2012, 19:18

Re: Registry Anpassung wird nicht übernommen (gelöst)

Beitrag von SisterOfMercy »

Yeah, but still.. I looks like there is a much simpler solution.
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
Antworten