Seite 1 von 1

Patch-Sektion mit Parameter /AllNTUserProfiles ?

Verfasst: 19 Jun 2012, 16:03
von JMS
Hallo zusammen,

schon wieder ich :roll:

Kann ich eigentlich auch einer Patch-Sektion den Parameter /AllNTUserProfiles usw. mitgeben oder geht das nur bei Files-Sektionen?

Ich habe mir das für das Opera-Paket so vorgestellt:

Code: Alles auswählen

if not ($home_url$ = "")
	set $patchcommand$ = "set [User Prefs]Home URL=" + $home_url$
;	Patches_app "c:\dummy.ini"
	Patches_app "%UserProfileDir%\AppData\Roaming\Opera\Opera\operaprefs.ini" /AllNtUserProfiles
endif

[Patches_app]
$patchcommand$

Im Handbuch steht dazu leider nichts... das Skript will auch nicht ...


Viele Grüße

JMS

Re: Patch-Sektion mit Parameter /AllNTUserProfiles ?

Verfasst: 20 Jun 2012, 14:02
von d.oertel
Hi,

nein das gibt es so nicht. (Ich denk mal drüber nach ob ich es baue).

Workaround:
etwas in der Art (hier firefox):

Code: Alles auswählen

                comment "now we patch the existing user profiles"
                comment "get user directories via dosbatch dir command"
                Set $profiles$ = getOutStreamFromSection ('dosbatch_profiledir')
                comment "loop over the result"
                for $x$ in $profiles$ do sub_patch_prefs_file

[dosbatch_profiledir]
@echo off
dir "%ProfileDir%" /b

[sub_patch_prefs_file]
Set $akt_profile_ini$ = "%ProfileDir%\"+"$x$"+$AppData$+"\Mozilla\Firefox\profiles.ini"
if FileExists($akt_profile_ini$)
        Set $rel_prefs_path$ = GetValueFromInifile($akt_profile_ini$,"Profile0","Path","")
        Set $akt_prefs_path$ = "%ProfileDir%\"+"$x$"+$AppData$+"\Mozilla\Firefox\"+$rel_prefs_path$
        if FileExists($akt_prefs_path$+"\"+$PREF_FILE$)
                if ($NOAUTOUPDATE$ = "on")
                        PatchTextFile_profile_noautoupdate $akt_prefs_path$+"\"+$PREF_FILE$
                endif
        endif
endif

[PatchTextFile_profile_noautoupdate]
Set_Netscape_User_Pref ("app.update.enabled", false)

gruß

d.oertel