close
Warning:
Failed to sync with repository "ogBrowser-Git": (1366, "Incorrect string value: '\\xF0\\x9F\\x93\\xA6 I...' for column 'message' at row 1"); repository information may be out of date. Look in the Trac log for more information including mitigation strategies.
lgromero-new-oglive
|
Last change
on this file was
41d66ae,
checked in by Irina Gómez <irinagomez@…>, 7 years ago
|
|
#780 buildToOrder works with Windows 8 and Windows 10. When no key exists, it is created.
|
-
Property mode set to
100755
|
|
File size:
2.3 KB
|
| Line | |
|---|
| 1 | #!/bin/bash |
|---|
| 2 | |
|---|
| 3 | #/** |
|---|
| 4 | # BuildToOrder |
|---|
| 5 | #@brief Script de ejemplo para realizar una configuracion del sistema operativo antes de generar imagen o de restaurado. |
|---|
| 6 | #@brief Activa el uso de los contralodres de disco más usados en windows 7. |
|---|
| 7 | #@brief (puede usarse como complemento para el programa de creación de imágenes o de restauración). |
|---|
| 8 | #@param 1 disco |
|---|
| 9 | #@param 2 particion |
|---|
| 10 | #@return |
|---|
| 11 | #@TODO |
|---|
| 12 | #@exception |
|---|
| 13 | #@version 1.0.4 - Discos ide + SATA. |
|---|
| 14 | #@author |
|---|
| 15 | #@date 2012-10-05 |
|---|
| 16 | #@version 1.1.1b - Funciona para Windows8 y Windows 10. Si la clave no existe (tiene valor vacío) se crea. |
|---|
| 17 | #@date 2020-05-04 |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | #Control de parametros. |
|---|
| 21 | PROG="$(basename $0)" |
|---|
| 22 | if [ $# -ne 2 ]; then |
|---|
| 23 | ogRaiseError $OG_ERR_FORMAT "Formato: $PROG ndisco nparticion" |
|---|
| 24 | exit $? |
|---|
| 25 | fi |
|---|
| 26 | |
|---|
| 27 | |
|---|
| 28 | MNTDIR=$(ogMount $1 $2) |
|---|
| 29 | |
|---|
| 30 | # filtro Tipo de sistema operativo. |
|---|
| 31 | OSTYPE="$(ogGetOsType $1 $2)" |
|---|
| 32 | |
|---|
| 33 | |
|---|
| 34 | case "$OSTYPE" in |
|---|
| 35 | Windows) |
|---|
| 36 | echo "Filtro versión de sistema operativo windows." |
|---|
| 37 | TYPE=$(ogGetOsVersion $1 $2) |
|---|
| 38 | case "$TYPE" in |
|---|
| 39 | *Windows\ XP) |
|---|
| 40 | echo "Versión de sistema operativo Windows XP no soportado" |
|---|
| 41 | exit |
|---|
| 42 | ;; |
|---|
| 43 | *Windows\ 7*) |
|---|
| 44 | # Claves a modificar |
|---|
| 45 | KEYS="intelide pciide msahci iaStorV iaStor LSI_SAS" |
|---|
| 46 | |
|---|
| 47 | ;; |
|---|
| 48 | *Windows\ *8*|*10*) |
|---|
| 49 | # Claves a modificar |
|---|
| 50 | KEYS="intelide pciide storahci iaStorV iaStorAC iaStorAVC LSI_SAS" |
|---|
| 51 | ;; |
|---|
| 52 | esac |
|---|
| 53 | |
|---|
| 54 | echo "$TYPE" |
|---|
| 55 | CONTROLSET="ControlSet001 ControlSet002" |
|---|
| 56 | for C in $CONTROLSET; |
|---|
| 57 | # Si no existe la rama de registro continuo a la siguiente. |
|---|
| 58 | [ "$(ogListRegistryKeys $MNTDIR SYSTEM '\'${C})" == "" ] && continue |
|---|
| 59 | |
|---|
| 60 | for K in $KEYS; do |
|---|
| 61 | FULLK='\'$C'\Services\'$K'\Start' |
|---|
| 62 | VALUE=$(ogGetRegistryValue $MNTDIR SYSTEM "$FULLK") |
|---|
| 63 | # Si el valor está vacío la creo. |
|---|
| 64 | if [ "$VALUE" == "" ]; then |
|---|
| 65 | ogDeleteRegistryValue $MNTDIR SYSTEM "$FULLK" |
|---|
| 66 | ogAddRegistryValue $MNTDIR SYSTEM "$FULLK" DWORD |
|---|
| 67 | fi |
|---|
| 68 | ogSetRegistryValue $MNTDIR SYSTEM "$FULLK" '0' |
|---|
| 69 | echo " * $C $K enabled" |
|---|
| 70 | done |
|---|
| 71 | done |
|---|
| 72 | ;; |
|---|
| 73 | Linux) |
|---|
| 74 | echo "Versión de Sistema Operativo GNU/Linux no soportado" |
|---|
| 75 | ;; |
|---|
| 76 | *) |
|---|
| 77 | echo "Sistema Operativo no soportado" |
|---|
| 78 | ;; |
|---|
| 79 | esac |
|---|
Note: See
TracBrowser
for help on using the repository browser.
Download in other formats: