Wird ein Rechner in einem Rutsch installiert, fehlen die Benutzerspezifischen Angaben. Wird hingegen das Paket nach dem ersten Anmelden des Benutzers installiert funktioniert es. Kann mir jemand helfen, wo der Unterschied lieg?
Gibt es auch so etwas wie den /AllNtUserDats-Parameter bei der Registry, welcher in das Default-Profil schreibt?
Beim loopen sollten meiner Meinung auch das Default-Profil gefunden werden, so dass es eigentlich keine Rolle spielen sollte, ob sich der Benutzer schon einmal angemeldet hat oder nicht.
Ich mache es in der Regel so:
Code: Alles auswählen
Set $profiles$ = getOutStreamFromSection ('dosbatch_profiledir')
comment "loop over the result"
for $profile_entry$ in $profiles$ do sub_patch_prefs_file
[dosbatch_profiledir]
@echo off
dir "%ProfileDir%" /b
[sub_patch_prefs_file]
; Set $akt_profile_ini$ = "%ProfileDir%\"+"$profile_entry$"+$AppData$+"\Mozilla\Firefox\profiles.ini"
Set $akt_profile_ini$ = $AppData$+"\Mozilla\Firefox\profiles.ini"
if FileExists($akt_profile_ini$)
Set $rel_prefs_path$ = GetIni ($akt_profile_ini$ [Profile0] Path)
Set $akt_prefs_path$ = "%ProfileDir%\"+"$profile_entry$"+$AppData$+"\Mozilla\Firefox\"+$rel_prefs_path$
Set $PROFILE_PATH$ = $akt_prefs_path$
if FileExists($akt_prefs_path$+"\"+$PREF_FILE$)
comment "copy preferences"
if (FileExists("%ScriptPath%\prefs.js"))
Files_copy_prefs
else
if (IniVar("NoAutoUpdate") = "on")
PatchTextFile_profile_noautoupdate $akt_prefs_path$+"\"+$PREF_FILE$
endif
endif
comment "copy bookmarks"
if (FileExists("%ScriptPath%\bookmarks.html"))
Files_copy_bookmarks
endif
if not(((IniVar("SetProxy") = "off") or (IniVar("SetProxy") = "")))
if (IniVar("SetProxy") = "direct")
PatchTextFile_profile_proxy_direct $akt_prefs_path$+"\"+$PREF_FILE$
endif
if (IniVar("SetProxy") = "manual")
set $PROXY_HOSTNAME_OR_IP$ = IniVar("Proxysetting")
set $PROXY_PORT$ = takeString(1,splitString($PROXY_HOSTNAME_OR_IP$,":"))
set $PROXY_HOSTNAME_OR_IP$ = takeString(0,splitString($PROXY_HOSTNAME_OR_IP$,":"))
PatchTextFile_profile_proxy_manual $akt_prefs_path$+"\"+$PREF_FILE$
endif
if (IniVar("SetProxy") = "file")
set $PROXY_HOSTNAME_OR_IP$ = IniVar("Proxysetting")
PatchTextFile_profile_proxy_file $akt_prefs_path$+"\"+$PREF_FILE$
endif
endif
endif
endif