summaryrefslogtreecommitdiffstats
path: root/client/engine/PostConf.lib
diff options
context:
space:
mode:
Diffstat (limited to 'client/engine/PostConf.lib')
-rwxr-xr-xclient/engine/PostConf.lib11
1 files changed, 7 insertions, 4 deletions
diff --git a/client/engine/PostConf.lib b/client/engine/PostConf.lib
index 80c0b24f..647423a3 100755
--- a/client/engine/PostConf.lib
+++ b/client/engine/PostConf.lib
@@ -40,7 +40,7 @@ fi
# Punto de montaje
MOUNTPOINT="$(ogMount "$1" "$2")" || return $?
# Comprobar que existe el fichero de comandos.
-CMDFILE=$(ogGetPath "$MOUNTPOINT/windows/system32/$3")
+CMDFILE="$(ogGetPath "$MOUNTPOINT/windows/system32")/$3"
[ -n "$CMDFILE" ] || ogRaiseError $OG_ERR_NOTFOUND "$MOUNTPOINT/windows/system32/$3" || return $?
# Concatenamos el comando en el fichero de comandos
@@ -244,7 +244,7 @@ for i in winnt windows; do
[ -n "$DIR" ] && CMDDIR=$DIR
done
[ -n "$CMDDIR" ] || ogRaiseError $OG_ERR_NOTFOUND "$MNTDIR/windows/system32" || return $?
-CMDFILE="$CMDDIR/$2"
+CMDFILE="$CMDDIR/$3"
# Creamos el archivo cmd y creamos un par de comandos para que una vez acabe la
# postconfiguracion resetee el mini setup, sino lo haria en cada arranque.
@@ -253,10 +253,13 @@ REG ADD HKLM\System\Setup /v SystemSetupInProgress /t REG_DWORD /d 0 /f
REG ADD HKLM\System\Setup /v CmdLine /t REG_SZ /d "" /f
EOF
-#Creamos las claves de registro necesarias para que se haga la ejecucion del .cmd al aranque
+# Crear los valores de registro necesarios para que se haga la ejecuciĆ³n del .cmd al aranque.
ogSetRegistryValue "$MNTDIR" SYSTEM "\Setup\SystemSetupInProgress" 1
ogSetRegistryValue "$MNTDIR" SYSTEM "\Setup\SetupType" 4
-ogSetRegistryValue "$MNTDIR" SYSTEM "\Setup\CmdLine" "cmd.exe /c $2"
+# Borrar y crear el valor para compatibilidad con algunos sistmeas.
+ogDeleteRegistryValue "$MNTDIR" SYSTEM "\Setup\CmdLine"
+ogAddRegistryValue "$MNTDIR" SYSTEM "\Setup\CmdLine"
+ogSetRegistryValue "$MNTDIR" SYSTEM "\Setup\CmdLine" "cmd.exe /c $(basename $CMDFILE)"
}