Soporte sobre Script

08/01/2006 - 17:22 por Miguel A. | Informe spam
Quiero distribuir varios Hotfix a los portatiles de mi empresa y mi idea es
hacerlo o bien a través de un cd o a través de un Pendrive. He creado el
siguiente script:

@echo off

REM INSTALLING HOTFIXES
echo "Installing Microsoft Hotfixes"
echo Please Wait

echo KB912919 Installed
START /wait %SYSTEMDRIVE%\SISTEMAS\Setup\hotfixes\KB912919.exe /u /q /z
echo KB905915 Installed
START /wait %SYSTEMDRIVE%\SISTEMAS\Setup\hotfixes\KB905915.exe /u /q /z
echo KB910437 Installed
START /wait %SYSTEMDRIVE%\SISTEMAS\Setup\hotfixes\KB910437.exe /u /q /z


echo.
echo Now running qchain.exe to ensure that all hotfixes are installed
correctly
START /wait %SYSTEMDRIVE%\SISTEMAS\Setup\hotfixes\qchain.exe
%SYSTEMDRIVE%\SISTEMAS\hotfix_log1.log
EXIT

El problema es que como veis los hotfix deben estar en %SYSTEMDRIVE%, existe
alguna manera de decirle que estan en el CD o Pendrive?

Preguntas similare

Leer las respuestas

#11 Miguel A.
08/01/2006 - 20:00 | Informe spam
pero como invoco el script?

"JM Tella Llop [MVP Windows]" escribió en el mensaje
news:
donde he puesto el %1, lo cambias por %IP%

Jose Manuel Tella Llop
MVP - Windows
(quitar XXX)
http://www.multingles.net/jmt.htm
news://jmtella.com

Este mensaje se proporciona "como está" sin garantías de ninguna clase,
y no otorga ningún derecho.

This posting is provided "AS IS" with no warranties, and confers no
rights.
You assume all risk for your use.



"Miguel A." wrote in message
news:OLwp%
Es decir,
set /p IP= Por favor, introduzca Direccion IP

y luego?


"JM Tella Llop [MVP Windows]" escribió en el mensaje
news:
hombre esto es tan facil, como crearte un cmd como el que te adjunto.
Se le invoca con:

w1 xxx.yyy.zzz.ttt

(es decir con la IP como parametro se puede hacer que la pida con set
/p, como veas)

Esto genera el vbs. Si al final como ultima linea invocas al vbsse
ejecutará.


Jose Manuel Tella Llop
MVP - Windows
(quitar XXX)
http://www.multingles.net/jmt.htm
news://jmtella.com

Este mensaje se proporciona "como está" sin garantías de ninguna clase,
y no otorga ningún derecho.

This posting is provided "AS IS" with no warranties, and confers no
rights.
You assume all risk for your use.



"Miguel A." wrote in message
news:%
gracias de antemando.
yo tengo el script siguiente:

strComputer = "."
strIPAddress = Array("127.16.3.1")
strSubnetMask = Array("255.255.255.0")
strGateway = Array("172.16.3.10")
strDNSServers = Array("x", "x")

Set objWMIService = GetObject("winmgmts:\\" & strComputer &
"oot\cimv2")
Set colNetAdapters = objWMIService.ExecQuery _
("Select * from Win32_NetworkAdapterConfiguration where
IPEnabled=TRUE")

For Each objNetAdapter in colNetAdapters
errEnable = objNetAdapter.EnableStatic(strIPAddress, strSubnetMask)
errGateways = objNetAdapter.SetGateways(strGateway)
errDNSServers = objNetAdapter.SetDNSServerSearchOrder(strDNSServers)

If errEnable = 0 Then
WScript.Echo "La configuracion IP ha sido configurada para
"&strComputer
Else
WScript.Echo "La configuracion IP no ha podido ser configurada.
Contacte con Sistemas"
End If
Next

set strIPAddress = nothing
set strSubnetMask = nothing
set strGateway = nothing
set strComputer = nothing

wscript.quit

quisiera que antes de ejecutarse pidiera al comercial que introdujera la
IP
y a su vez se refrescara este script. Lo voy a poner al final en un USB.

GRACIAS.


"JM Tella Llop [MVP Windows]" escribió en el
mensaje
news:
Dime exactamente que quieres hacer y que es lo quequieres que contenga
ese
vbs final.

Jose Manuel Tella Llop
MVP - Windows
(quitar XXX)
http://www.multingles.net/jmt.htm
news://jmtella.com

Este mensaje se proporciona "como está" sin garantías de ninguna clase,
y no otorga ningún derecho.

This posting is provided "AS IS" with no warranties, and confers no
rights.
You assume all risk for your use.



"Miguel A." wrote in message
news:%23%
Me puedes poner un ejemplo?, es que estoy empezando con lo de los
scripts,
por eso el otro dia postee si habia algun libro ;-)

"JM Tella Llop [MVP Windows]" escribió en el
mensaje
news:
Se puede ;-)

con el comando for, puedes leer las lineas de un archivo de texto, por
ejemplo y si lees, puedes escribir con echo >> y modificar las que
quieras.

Jose Manuel Tella Llop
MVP - Windows
(quitar XXX)
http://www.multingles.net/jmt.htm
news://jmtella.com

Este mensaje se proporciona "como está" sin garantías de ninguna clase,
y no otorga ningún derecho.

This posting is provided "AS IS" with no warranties, and confers no
rights.
You assume all risk for your use.



"Miguel A." wrote in message
news:
Gracias.
otra cosita si puedes
tb estoy creando script en VBs para que configuren la IP/SUBRED/GATEWAY
y
DNS:

strComputer = "."
strIPAddress = Array("172.16.3.1")
strSubnetMask = Array("255.255.255.0")
strGateway = Array("172.16.3.10")
strDNSServers = Array("x", "x")
...
wscript.quit

se puede hacer un bat/cmd que le pregunte la IP y lo añada a la cadena
strIPAddress = Array("172.16.3.1") y no tengan que estar modificando el
script?

"JM Tella Llop [MVP Windows]" escribió en el
mensaje
news:
El hotfix puede estar donde quieras. Si no le pones ruta, lo buscará en
la
propia unidad donde resida el script. Y no es necesario lanzarlo con
start..

Jose Manuel Tella Llop
MVP - Windows
(quitar XXX)
http://www.multingles.net/jmt.htm
news://jmtella.com

Este mensaje se proporciona "como está" sin garantías de ninguna clase,
y no otorga ningún derecho.

This posting is provided "AS IS" with no warranties, and confers no
rights.
You assume all risk for your use.



"Miguel A." wrote in message
news:e2AxA$
Quiero distribuir varios Hotfix a los portatiles de mi empresa y mi
idea
es
hacerlo o bien a través de un cd o a través de un Pendrive. He creado
el
siguiente script:

@echo off

REM INSTALLING HOTFIXES
echo "Installing Microsoft Hotfixes"
echo Please Wait

echo KB912919 Installed
START /wait %SYSTEMDRIVE%\SISTEMAS\Setup\hotfixes\KB912919.exe /u /q
/z
echo KB905915 Installed
START /wait %SYSTEMDRIVE%\SISTEMAS\Setup\hotfixes\KB905915.exe /u /q
/z
echo KB910437 Installed
START /wait %SYSTEMDRIVE%\SISTEMAS\Setup\hotfixes\KB910437.exe /u /q
/z


echo.
echo Now running qchain.exe to ensure that all hotfixes are installed
correctly
START /wait %SYSTEMDRIVE%\SISTEMAS\Setup\hotfixes\qchain.exe
%SYSTEMDRIVE%\SISTEMAS\hotfix_log1.log
EXIT

El problema es que como veis los hotfix deben estar en %SYSTEMDRIVE%,
existe
alguna manera de decirle que estan en el CD o Pendrive?























Respuesta Responder a este mensaje
#12 Miguel A.
08/01/2006 - 20:13 | Informe spam
ya lo he echo, pero cuando ejecuto en la ultima linea el vbs me dice error
de compilacion

"Miguel A." escribió en el mensaje
news:
pero como invoco el script?

"JM Tella Llop [MVP Windows]" escribió en el mensaje
news:
donde he puesto el %1, lo cambias por %IP%

Jose Manuel Tella Llop
MVP - Windows
(quitar XXX)
http://www.multingles.net/jmt.htm
news://jmtella.com

Este mensaje se proporciona "como está" sin garantías de ninguna clase,
y no otorga ningún derecho.

This posting is provided "AS IS" with no warranties, and confers no
rights.
You assume all risk for your use.



"Miguel A." wrote in message
news:OLwp%
Es decir,
set /p IP= Por favor, introduzca Direccion IP

y luego?


"JM Tella Llop [MVP Windows]" escribió en el mensaje
news:
hombre esto es tan facil, como crearte un cmd como el que te adjunto.
Se le invoca con:

w1 xxx.yyy.zzz.ttt

(es decir con la IP como parametro se puede hacer que la pida con set
/p, como veas)

Esto genera el vbs. Si al final como ultima linea invocas al vbsse
ejecutará.


Jose Manuel Tella Llop
MVP - Windows
(quitar XXX)
http://www.multingles.net/jmt.htm
news://jmtella.com

Este mensaje se proporciona "como está" sin garantías de ninguna clase,
y no otorga ningún derecho.

This posting is provided "AS IS" with no warranties, and confers no
rights.
You assume all risk for your use.



"Miguel A." wrote in message
news:%
gracias de antemando.
yo tengo el script siguiente:

strComputer = "."
strIPAddress = Array("127.16.3.1")
strSubnetMask = Array("255.255.255.0")
strGateway = Array("172.16.3.10")
strDNSServers = Array("x", "x")

Set objWMIService = GetObject("winmgmts:\\" & strComputer &
"oot\cimv2")
Set colNetAdapters = objWMIService.ExecQuery _
("Select * from Win32_NetworkAdapterConfiguration where
IPEnabled=TRUE")

For Each objNetAdapter in colNetAdapters
errEnable = objNetAdapter.EnableStatic(strIPAddress, strSubnetMask)
errGateways = objNetAdapter.SetGateways(strGateway)
errDNSServers = objNetAdapter.SetDNSServerSearchOrder(strDNSServers)

If errEnable = 0 Then
WScript.Echo "La configuracion IP ha sido configurada para
"&strComputer
Else
WScript.Echo "La configuracion IP no ha podido ser configurada.
Contacte con Sistemas"
End If
Next

set strIPAddress = nothing
set strSubnetMask = nothing
set strGateway = nothing
set strComputer = nothing

wscript.quit

quisiera que antes de ejecutarse pidiera al comercial que introdujera la
IP
y a su vez se refrescara este script. Lo voy a poner al final en un USB.

GRACIAS.


"JM Tella Llop [MVP Windows]" escribió en el
mensaje
news:
Dime exactamente que quieres hacer y que es lo quequieres que contenga
ese
vbs final.

Jose Manuel Tella Llop
MVP - Windows
(quitar XXX)
http://www.multingles.net/jmt.htm
news://jmtella.com

Este mensaje se proporciona "como está" sin garantías de ninguna clase,
y no otorga ningún derecho.

This posting is provided "AS IS" with no warranties, and confers no
rights.
You assume all risk for your use.



"Miguel A." wrote in message
news:%23%
Me puedes poner un ejemplo?, es que estoy empezando con lo de los
scripts,
por eso el otro dia postee si habia algun libro ;-)

"JM Tella Llop [MVP Windows]" escribió en el
mensaje
news:
Se puede ;-)

con el comando for, puedes leer las lineas de un archivo de texto, por
ejemplo y si lees, puedes escribir con echo >> y modificar las que
quieras.

Jose Manuel Tella Llop
MVP - Windows
(quitar XXX)
http://www.multingles.net/jmt.htm
news://jmtella.com

Este mensaje se proporciona "como está" sin garantías de ninguna clase,
y no otorga ningún derecho.

This posting is provided "AS IS" with no warranties, and confers no
rights.
You assume all risk for your use.



"Miguel A." wrote in message
news:
Gracias.
otra cosita si puedes
tb estoy creando script en VBs para que configuren la IP/SUBRED/GATEWAY
y
DNS:

strComputer = "."
strIPAddress = Array("172.16.3.1")
strSubnetMask = Array("255.255.255.0")
strGateway = Array("172.16.3.10")
strDNSServers = Array("x", "x")
...
wscript.quit

se puede hacer un bat/cmd que le pregunte la IP y lo añada a la cadena
strIPAddress = Array("172.16.3.1") y no tengan que estar modificando el
script?

"JM Tella Llop [MVP Windows]" escribió en el
mensaje
news:
El hotfix puede estar donde quieras. Si no le pones ruta, lo buscará en
la
propia unidad donde resida el script. Y no es necesario lanzarlo con
start..

Jose Manuel Tella Llop
MVP - Windows
(quitar XXX)
http://www.multingles.net/jmt.htm
news://jmtella.com

Este mensaje se proporciona "como está" sin garantías de ninguna clase,
y no otorga ningún derecho.

This posting is provided "AS IS" with no warranties, and confers no
rights.
You assume all risk for your use.



"Miguel A." wrote in message
news:e2AxA$
Quiero distribuir varios Hotfix a los portatiles de mi empresa y mi
idea
es
hacerlo o bien a través de un cd o a través de un Pendrive. He creado
el
siguiente script:

@echo off

REM INSTALLING HOTFIXES
echo "Installing Microsoft Hotfixes"
echo Please Wait

echo KB912919 Installed
START /wait %SYSTEMDRIVE%\SISTEMAS\Setup\hotfixes\KB912919.exe /u /q
/z
echo KB905915 Installed
START /wait %SYSTEMDRIVE%\SISTEMAS\Setup\hotfixes\KB905915.exe /u /q
/z
echo KB910437 Installed
START /wait %SYSTEMDRIVE%\SISTEMAS\Setup\hotfixes\KB910437.exe /u /q
/z


echo.
echo Now running qchain.exe to ensure that all hotfixes are installed
correctly
START /wait %SYSTEMDRIVE%\SISTEMAS\Setup\hotfixes\qchain.exe
%SYSTEMDRIVE%\SISTEMAS\hotfix_log1.log
EXIT

El problema es que como veis los hotfix deben estar en %SYSTEMDRIVE%,
existe
alguna manera de decirle que estan en el CD o Pendrive?























Respuesta Responder a este mensaje
#13 JM Tella Llop [MVP Windows]
08/01/2006 - 20:41 | Informe spam
No

echo strIPAddress = Array("%IP%") >>script.vbs

falta un % al final de IP

Jose Manuel Tella Llop
MVP - Windows
(quitar XXX)
http://www.multingles.net/jmt.htm
news://jmtella.com

Este mensaje se proporciona "como está" sin garantías de ninguna clase,
y no otorga ningún derecho.

This posting is provided "AS IS" with no warranties, and confers no
rights.
You assume all risk for your use.



"Miguel A." wrote in message
news:
me figuro que luego en el script:
echo strIPAddress = Array("%IP") >>script.vbs no?


"Miguel A." escribió en el mensaje
news:OLwp%
Es decir,
set /p IP= Por favor, introduzca Direccion IP

y luego?


"JM Tella Llop [MVP Windows]" escribió en el mensaje
news:
hombre esto es tan facil, como crearte un cmd como el que te adjunto.
Se le invoca con:

w1 xxx.yyy.zzz.ttt

(es decir con la IP como parametro se puede hacer que la pida con set
/p, como veas)

Esto genera el vbs. Si al final como ultima linea invocas al vbsse
ejecutará.


Jose Manuel Tella Llop
MVP - Windows
(quitar XXX)
http://www.multingles.net/jmt.htm
news://jmtella.com

Este mensaje se proporciona "como está" sin garantías de ninguna clase,
y no otorga ningún derecho.

This posting is provided "AS IS" with no warranties, and confers no
rights.
You assume all risk for your use.



"Miguel A." wrote in message
news:%
gracias de antemando.
yo tengo el script siguiente:

strComputer = "."
strIPAddress = Array("127.16.3.1")
strSubnetMask = Array("255.255.255.0")
strGateway = Array("172.16.3.10")
strDNSServers = Array("x", "x")

Set objWMIService = GetObject("winmgmts:\\" & strComputer &
"oot\cimv2")
Set colNetAdapters = objWMIService.ExecQuery _
("Select * from Win32_NetworkAdapterConfiguration where
IPEnabled=TRUE")

For Each objNetAdapter in colNetAdapters
errEnable = objNetAdapter.EnableStatic(strIPAddress, strSubnetMask)
errGateways = objNetAdapter.SetGateways(strGateway)
errDNSServers = objNetAdapter.SetDNSServerSearchOrder(strDNSServers)

If errEnable = 0 Then
WScript.Echo "La configuracion IP ha sido configurada para
"&strComputer
Else
WScript.Echo "La configuracion IP no ha podido ser configurada.
Contacte con Sistemas"
End If
Next

set strIPAddress = nothing
set strSubnetMask = nothing
set strGateway = nothing
set strComputer = nothing

wscript.quit

quisiera que antes de ejecutarse pidiera al comercial que introdujera la
IP
y a su vez se refrescara este script. Lo voy a poner al final en un USB.

GRACIAS.


"JM Tella Llop [MVP Windows]" escribió en el
mensaje
news:
Dime exactamente que quieres hacer y que es lo quequieres que contenga
ese
vbs final.

Jose Manuel Tella Llop
MVP - Windows
(quitar XXX)
http://www.multingles.net/jmt.htm
news://jmtella.com

Este mensaje se proporciona "como está" sin garantías de ninguna clase,
y no otorga ningún derecho.

This posting is provided "AS IS" with no warranties, and confers no
rights.
You assume all risk for your use.



"Miguel A." wrote in message
news:%23%
Me puedes poner un ejemplo?, es que estoy empezando con lo de los
scripts,
por eso el otro dia postee si habia algun libro ;-)

"JM Tella Llop [MVP Windows]" escribió en el
mensaje
news:
Se puede ;-)

con el comando for, puedes leer las lineas de un archivo de texto, por
ejemplo y si lees, puedes escribir con echo >> y modificar las que
quieras.

Jose Manuel Tella Llop
MVP - Windows
(quitar XXX)
http://www.multingles.net/jmt.htm
news://jmtella.com

Este mensaje se proporciona "como está" sin garantías de ninguna clase,
y no otorga ningún derecho.

This posting is provided "AS IS" with no warranties, and confers no
rights.
You assume all risk for your use.



"Miguel A." wrote in message
news:
Gracias.
otra cosita si puedes
tb estoy creando script en VBs para que configuren la IP/SUBRED/GATEWAY
y
DNS:

strComputer = "."
strIPAddress = Array("172.16.3.1")
strSubnetMask = Array("255.255.255.0")
strGateway = Array("172.16.3.10")
strDNSServers = Array("x", "x")
...
wscript.quit

se puede hacer un bat/cmd que le pregunte la IP y lo añada a la cadena
strIPAddress = Array("172.16.3.1") y no tengan que estar modificando el
script?

"JM Tella Llop [MVP Windows]" escribió en el
mensaje
news:
El hotfix puede estar donde quieras. Si no le pones ruta, lo buscará en
la
propia unidad donde resida el script. Y no es necesario lanzarlo con
start..

Jose Manuel Tella Llop
MVP - Windows
(quitar XXX)
http://www.multingles.net/jmt.htm
news://jmtella.com

Este mensaje se proporciona "como está" sin garantías de ninguna clase,
y no otorga ningún derecho.

This posting is provided "AS IS" with no warranties, and confers no
rights.
You assume all risk for your use.



"Miguel A." wrote in message
news:e2AxA$
Quiero distribuir varios Hotfix a los portatiles de mi empresa y mi
idea
es
hacerlo o bien a través de un cd o a través de un Pendrive. He creado
el
siguiente script:

@echo off

REM INSTALLING HOTFIXES
echo "Installing Microsoft Hotfixes"
echo Please Wait

echo KB912919 Installed
START /wait %SYSTEMDRIVE%\SISTEMAS\Setup\hotfixes\KB912919.exe /u /q
/z
echo KB905915 Installed
START /wait %SYSTEMDRIVE%\SISTEMAS\Setup\hotfixes\KB905915.exe /u /q
/z
echo KB910437 Installed
START /wait %SYSTEMDRIVE%\SISTEMAS\Setup\hotfixes\KB910437.exe /u /q
/z


echo.
echo Now running qchain.exe to ensure that all hotfixes are installed
correctly
START /wait %SYSTEMDRIVE%\SISTEMAS\Setup\hotfixes\qchain.exe
%SYSTEMDRIVE%\SISTEMAS\hotfix_log1.log
EXIT

El problema es que como veis los hotfix deben estar en %SYSTEMDRIVE%,
existe
alguna manera de decirle que estan en el CD o Pendrive?
























Respuesta Responder a este mensaje
#14 JM Tella Llop [MVP Windows]
08/01/2006 - 20:42 | Informe spam
Mira a ver si es lo que te he muesto en el otro mensaje del % al final de IP

Jose Manuel Tella Llop
MVP - Windows
(quitar XXX)
http://www.multingles.net/jmt.htm
news://jmtella.com

Este mensaje se proporciona "como está" sin garantías de ninguna clase,
y no otorga ningún derecho.

This posting is provided "AS IS" with no warranties, and confers no
rights.
You assume all risk for your use.



"Miguel A." wrote in message
news:
ya lo he echo, pero cuando ejecuto en la ultima linea el vbs me dice error
de compilacion

"Miguel A." escribió en el mensaje
news:
pero como invoco el script?

"JM Tella Llop [MVP Windows]" escribió en el mensaje
news:
donde he puesto el %1, lo cambias por %IP%

Jose Manuel Tella Llop
MVP - Windows
(quitar XXX)
http://www.multingles.net/jmt.htm
news://jmtella.com

Este mensaje se proporciona "como está" sin garantías de ninguna clase,
y no otorga ningún derecho.

This posting is provided "AS IS" with no warranties, and confers no
rights.
You assume all risk for your use.



"Miguel A." wrote in message
news:OLwp%
Es decir,
set /p IP= Por favor, introduzca Direccion IP

y luego?


"JM Tella Llop [MVP Windows]" escribió en el
mensaje
news:
hombre esto es tan facil, como crearte un cmd como el que te adjunto.
Se le invoca con:

w1 xxx.yyy.zzz.ttt

(es decir con la IP como parametro se puede hacer que la pida con set
/p, como veas)

Esto genera el vbs. Si al final como ultima linea invocas al vbsse
ejecutará.


Jose Manuel Tella Llop
MVP - Windows
(quitar XXX)
http://www.multingles.net/jmt.htm
news://jmtella.com

Este mensaje se proporciona "como está" sin garantías de ninguna clase,
y no otorga ningún derecho.

This posting is provided "AS IS" with no warranties, and confers no
rights.
You assume all risk for your use.



"Miguel A." wrote in message
news:%
gracias de antemando.
yo tengo el script siguiente:

strComputer = "."
strIPAddress = Array("127.16.3.1")
strSubnetMask = Array("255.255.255.0")
strGateway = Array("172.16.3.10")
strDNSServers = Array("x", "x")

Set objWMIService = GetObject("winmgmts:\\" & strComputer &
"oot\cimv2")
Set colNetAdapters = objWMIService.ExecQuery _
("Select * from Win32_NetworkAdapterConfiguration where
IPEnabled=TRUE")

For Each objNetAdapter in colNetAdapters
errEnable = objNetAdapter.EnableStatic(strIPAddress, strSubnetMask)
errGateways = objNetAdapter.SetGateways(strGateway)
errDNSServers = objNetAdapter.SetDNSServerSearchOrder(strDNSServers)

If errEnable = 0 Then
WScript.Echo "La configuracion IP ha sido configurada para
"&strComputer
Else
WScript.Echo "La configuracion IP no ha podido ser configurada.
Contacte con Sistemas"
End If
Next

set strIPAddress = nothing
set strSubnetMask = nothing
set strGateway = nothing
set strComputer = nothing

wscript.quit

quisiera que antes de ejecutarse pidiera al comercial que introdujera la
IP
y a su vez se refrescara este script. Lo voy a poner al final en un USB.

GRACIAS.


"JM Tella Llop [MVP Windows]" escribió en el
mensaje
news:
Dime exactamente que quieres hacer y que es lo quequieres que contenga
ese
vbs final.

Jose Manuel Tella Llop
MVP - Windows
(quitar XXX)
http://www.multingles.net/jmt.htm
news://jmtella.com

Este mensaje se proporciona "como está" sin garantías de ninguna clase,
y no otorga ningún derecho.

This posting is provided "AS IS" with no warranties, and confers no
rights.
You assume all risk for your use.



"Miguel A." wrote in message
news:%23%
Me puedes poner un ejemplo?, es que estoy empezando con lo de los
scripts,
por eso el otro dia postee si habia algun libro ;-)

"JM Tella Llop [MVP Windows]" escribió en el
mensaje
news:
Se puede ;-)

con el comando for, puedes leer las lineas de un archivo de texto, por
ejemplo y si lees, puedes escribir con echo >> y modificar las que
quieras.

Jose Manuel Tella Llop
MVP - Windows
(quitar XXX)
http://www.multingles.net/jmt.htm
news://jmtella.com

Este mensaje se proporciona "como está" sin garantías de ninguna clase,
y no otorga ningún derecho.

This posting is provided "AS IS" with no warranties, and confers no
rights.
You assume all risk for your use.



"Miguel A." wrote in message
news:
Gracias.
otra cosita si puedes
tb estoy creando script en VBs para que configuren la
IP/SUBRED/GATEWAY
y
DNS:

strComputer = "."
strIPAddress = Array("172.16.3.1")
strSubnetMask = Array("255.255.255.0")
strGateway = Array("172.16.3.10")
strDNSServers = Array("x", "x")
...
wscript.quit

se puede hacer un bat/cmd que le pregunte la IP y lo añada a la cadena
strIPAddress = Array("172.16.3.1") y no tengan que estar modificando
el
script?

"JM Tella Llop [MVP Windows]" escribió en el
mensaje
news:
El hotfix puede estar donde quieras. Si no le pones ruta, lo buscará
en
la
propia unidad donde resida el script. Y no es necesario lanzarlo con
start..

Jose Manuel Tella Llop
MVP - Windows
(quitar XXX)
http://www.multingles.net/jmt.htm
news://jmtella.com

Este mensaje se proporciona "como está" sin garantías de ninguna
clase,
y no otorga ningún derecho.

This posting is provided "AS IS" with no warranties, and confers no
rights.
You assume all risk for your use.



"Miguel A." wrote in message
news:e2AxA$
Quiero distribuir varios Hotfix a los portatiles de mi empresa y mi
idea
es
hacerlo o bien a través de un cd o a través de un Pendrive. He creado
el
siguiente script:

@echo off

REM INSTALLING HOTFIXES
echo "Installing Microsoft Hotfixes"
echo Please Wait

echo KB912919 Installed
START /wait %SYSTEMDRIVE%\SISTEMAS\Setup\hotfixes\KB912919.exe /u /q
/z
echo KB905915 Installed
START /wait %SYSTEMDRIVE%\SISTEMAS\Setup\hotfixes\KB905915.exe /u /q
/z
echo KB910437 Installed
START /wait %SYSTEMDRIVE%\SISTEMAS\Setup\hotfixes\KB910437.exe /u /q
/z


echo.
echo Now running qchain.exe to ensure that all hotfixes are installed
correctly
START /wait %SYSTEMDRIVE%\SISTEMAS\Setup\hotfixes\qchain.exe
%SYSTEMDRIVE%\SISTEMAS\hotfix_log1.log
EXIT

El problema es que como veis los hotfix deben estar en %SYSTEMDRIVE%,
existe
alguna manera de decirle que estan en el CD o Pendrive?





























Respuesta Responder a este mensaje
#15 Miguel A.
08/01/2006 - 20:46 | Informe spam
Ya lo tengo.Muchas gracias.
Solo una pregunta mas si quieres ;-)

1.- Cuando ejecuto el script me pone :
%ruta_ejecutada%\set /p IP= Por favor, introduzca Direccion IP
Por favor, introduzca Direccion IP

como puedo eliminar la primera línea?

2.- Se puede que cuando se jecute por segunda,tercera... vez, antes de poner
la IP, salga un popu o mensaje que diga que la ultima ip utilizada es:

GRACIAS POR LAS MOLESTIAS

"JM Tella Llop [MVP Windows]" escribió en el mensaje
news:
No

echo strIPAddress = Array("%IP%") >>script.vbs

falta un % al final de IP

Jose Manuel Tella Llop
MVP - Windows
(quitar XXX)
http://www.multingles.net/jmt.htm
news://jmtella.com

Este mensaje se proporciona "como está" sin garantías de ninguna clase,
y no otorga ningún derecho.

This posting is provided "AS IS" with no warranties, and confers no
rights.
You assume all risk for your use.



"Miguel A." wrote in message
news:
me figuro que luego en el script:
echo strIPAddress = Array("%IP") >>script.vbs no?


"Miguel A." escribió en el mensaje
news:OLwp%
Es decir,
set /p IP= Por favor, introduzca Direccion IP

y luego?


"JM Tella Llop [MVP Windows]" escribió en el mensaje
news:
hombre esto es tan facil, como crearte un cmd como el que te adjunto.
Se le invoca con:

w1 xxx.yyy.zzz.ttt

(es decir con la IP como parametro se puede hacer que la pida con set
/p, como veas)

Esto genera el vbs. Si al final como ultima linea invocas al vbsse
ejecutará.


Jose Manuel Tella Llop
MVP - Windows
(quitar XXX)
http://www.multingles.net/jmt.htm
news://jmtella.com

Este mensaje se proporciona "como está" sin garantías de ninguna clase,
y no otorga ningún derecho.

This posting is provided "AS IS" with no warranties, and confers no
rights.
You assume all risk for your use.



"Miguel A." wrote in message
news:%
gracias de antemando.
yo tengo el script siguiente:

strComputer = "."
strIPAddress = Array("127.16.3.1")
strSubnetMask = Array("255.255.255.0")
strGateway = Array("172.16.3.10")
strDNSServers = Array("x", "x")

Set objWMIService = GetObject("winmgmts:\\" & strComputer &
"oot\cimv2")
Set colNetAdapters = objWMIService.ExecQuery _
("Select * from Win32_NetworkAdapterConfiguration where
IPEnabled=TRUE")

For Each objNetAdapter in colNetAdapters
errEnable = objNetAdapter.EnableStatic(strIPAddress, strSubnetMask)
errGateways = objNetAdapter.SetGateways(strGateway)
errDNSServers = objNetAdapter.SetDNSServerSearchOrder(strDNSServers)

If errEnable = 0 Then
WScript.Echo "La configuracion IP ha sido configurada para
"&strComputer
Else
WScript.Echo "La configuracion IP no ha podido ser configurada.
Contacte con Sistemas"
End If
Next

set strIPAddress = nothing
set strSubnetMask = nothing
set strGateway = nothing
set strComputer = nothing

wscript.quit

quisiera que antes de ejecutarse pidiera al comercial que introdujera la
IP
y a su vez se refrescara este script. Lo voy a poner al final en un USB.

GRACIAS.


"JM Tella Llop [MVP Windows]" escribió en el
mensaje
news:
Dime exactamente que quieres hacer y que es lo quequieres que contenga
ese
vbs final.

Jose Manuel Tella Llop
MVP - Windows
(quitar XXX)
http://www.multingles.net/jmt.htm
news://jmtella.com

Este mensaje se proporciona "como está" sin garantías de ninguna clase,
y no otorga ningún derecho.

This posting is provided "AS IS" with no warranties, and confers no
rights.
You assume all risk for your use.



"Miguel A." wrote in message
news:%23%
Me puedes poner un ejemplo?, es que estoy empezando con lo de los
scripts,
por eso el otro dia postee si habia algun libro ;-)

"JM Tella Llop [MVP Windows]" escribió en el
mensaje
news:
Se puede ;-)

con el comando for, puedes leer las lineas de un archivo de texto, por
ejemplo y si lees, puedes escribir con echo >> y modificar las que
quieras.

Jose Manuel Tella Llop
MVP - Windows
(quitar XXX)
http://www.multingles.net/jmt.htm
news://jmtella.com

Este mensaje se proporciona "como está" sin garantías de ninguna clase,
y no otorga ningún derecho.

This posting is provided "AS IS" with no warranties, and confers no
rights.
You assume all risk for your use.



"Miguel A." wrote in message
news:
Gracias.
otra cosita si puedes
tb estoy creando script en VBs para que configuren la IP/SUBRED/GATEWAY
y
DNS:

strComputer = "."
strIPAddress = Array("172.16.3.1")
strSubnetMask = Array("255.255.255.0")
strGateway = Array("172.16.3.10")
strDNSServers = Array("x", "x")
...
wscript.quit

se puede hacer un bat/cmd que le pregunte la IP y lo añada a la cadena
strIPAddress = Array("172.16.3.1") y no tengan que estar modificando el
script?

"JM Tella Llop [MVP Windows]" escribió en el
mensaje
news:
El hotfix puede estar donde quieras. Si no le pones ruta, lo buscará en
la
propia unidad donde resida el script. Y no es necesario lanzarlo con
start..

Jose Manuel Tella Llop
MVP - Windows
(quitar XXX)
http://www.multingles.net/jmt.htm
news://jmtella.com

Este mensaje se proporciona "como está" sin garantías de ninguna clase,
y no otorga ningún derecho.

This posting is provided "AS IS" with no warranties, and confers no
rights.
You assume all risk for your use.



"Miguel A." wrote in message
news:e2AxA$
Quiero distribuir varios Hotfix a los portatiles de mi empresa y mi
idea
es
hacerlo o bien a través de un cd o a través de un Pendrive. He creado
el
siguiente script:

@echo off

REM INSTALLING HOTFIXES
echo "Installing Microsoft Hotfixes"
echo Please Wait

echo KB912919 Installed
START /wait %SYSTEMDRIVE%\SISTEMAS\Setup\hotfixes\KB912919.exe /u /q
/z
echo KB905915 Installed
START /wait %SYSTEMDRIVE%\SISTEMAS\Setup\hotfixes\KB905915.exe /u /q
/z
echo KB910437 Installed
START /wait %SYSTEMDRIVE%\SISTEMAS\Setup\hotfixes\KB910437.exe /u /q
/z


echo.
echo Now running qchain.exe to ensure that all hotfixes are installed
correctly
START /wait %SYSTEMDRIVE%\SISTEMAS\Setup\hotfixes\qchain.exe
%SYSTEMDRIVE%\SISTEMAS\hotfix_log1.log
EXIT

El problema es que como veis los hotfix deben estar en %SYSTEMDRIVE%,
existe
alguna manera de decirle que estan en el CD o Pendrive?
























Respuesta Responder a este mensaje
Ads by Google
Help Hacer una preguntaSiguiente AnteriorRespuesta Tengo una respuesta
Search Busqueda sugerida