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

#6 Miguel A.
08/01/2006 - 18:52 | Informe spam
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
#7 JM Tella Llop [MVP Windows]
08/01/2006 - 19:09 | Informe spam
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?





















begin 666 w1.cmd
M96-H;R!S=')#;VUPqE<B ]("(N(B @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(#YS8W)I<'0N=F)S#0IE8VAO('-T<DE0061D
M<F5S<R ]($%R<F%Y*"(E,2(I(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @/CYS8W)I<'0N=F)S#0IE8VAO('-T<E-U8FYE=$UA<VL@/2!!<G)A
M>,C4U+C(U-2XR-34N,"(I(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @/CYS8W)I
M<'0N=F)S#0IE8VAO('-T<D=A=&5W87D@/2!!<G)A>,3<R+C$V+C,N,3 B
M*2 @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @/CYS8W)I<'0N=F)S#0IE8VAO
M('-T<D1.4U-E<G9E<G,@/2!!<G)A>"(L(")X(BD@(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @/CYS8W)I<'0N=F)S#0IE8VAO(%-E="!O8FI734E3
M97)V:6-E(#)J96-T*")W:6YM9VUT<SI<7"(@)B!S=')#;VUPqE
M<B F(")<<F]O=%QC:6UV,B(I(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @/CYS8W)I<'0N=F)S#0IE8VAO(%-E="!C;VQ.971!9&%P=&5R<R ](&]B
M:E=-25-E<G9I8V4N17AE8U%U97)Y(%\@(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @/CYS8W)I<'0N
M=F)S#0IE8VAO(" @(" H(E-E;&5C=" J(&9R;,S)?3F5T=V]R:T%D
M87!T97)#;VYF:6=U<F%T:6]N('=H97)E($E016YA8FQE9#U44E5%(BD@(" @
M(" @(" @(" @(" @(" @(" @(" @(" @/CYS8W)I<'0N=F)S#0IE8VAO($9O
M<B!%86-H(&]B:DYE=$%D87!T97(@:]L3F5T061A<'1E<G,@(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @/CYS8W)I<'0N=F)S#0IE8VAO(" @("!E<G)%;F%B;&4@
M/2!O8FI.971!9&%P=&5R+D5N86)L95-T871I8RAS='))4$%D9')E<W,L('-T
M<E-U8FYE=$UA<VLI(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M/CYS8W)I<'0N=F)S#0IE8VAO(" @("!E<G)'871E=V%Y<R ](&]B:DYE=$%D
M87!T97(N4V5T1V%T97=A>7,H<W1R1V%T97=A>2D@(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @/CYS8W)I<'0N=F)S
M#0IE8VAO(" @("!E<G)$3E-397)V97)S(#T@;V)J3F5T061A<'1E<BY3971$
M3E-397)V97)396%R8VA/<F1E<BAS=')$3E-397)V97)S*2 @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @/CYS8W)I<'0N=F)S#0IE8VAO(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @/CYS8W)I<'0N=F)S#0IE8VAO(" @("!)9B!E<G)%;F%B;&4@
M/2 P(%1H96X@(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @/CYS
M8W)I<'0N=F)S#0IE8VAO(" @(" @(" @5U-C<FEP="Y%8VAO("),82!C;VYF
M:6=U<F%C:6]N($E0(&AA('-I9&\@8V]N9FEG=7)A9&$@<&%R82 B)G-T<D-O
M;7!U=&5R(" @(" @(" @(" @(" @(" @(" @(" @/CYS8W)I<'0N=F)S#0IE
M8VAO(" @("!%;'-E(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @/CYS8W)I<'0N=F)S#0IE8VAO(" @(" @(" @
M5U-C<FEP="Y%8VAO("),82!C;VYF:6=U<F%C:6]N($E0(&YO(&AA('!O9&ED
M;R!S97(@8V]N9FEG=7)A9&$N($-O;G1A8W1E(&-O;B!3:7-T96UA<R(@(" @
M(" @(" @/CYS8W)I<'0N=F)S#0IE8VAO(" @("!%;@(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @/CYS8W)I
M<'0N=F)S#0IE8VAO($YE>'0@(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @/CYS8W)I<'0N=F)S#0IE8VAO
M('-E="!S='))4$%D9')E<W,@/2!N;W1H:6YG(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @/CYS8W)I<'0N=F)S#0IE8VAO('-E="!S=')3=6)N
M971-87-K(#T@;F]T:&EN9R @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @/CYS8W)I<'0N=F)S#0IE8VAO('-E="!S=')'871E=V%Y(#T@;F]T:&EN
M9R @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @/CYS8W)I<'0N
M=F)S#0IE8VAO('-E="!S=')#;VUPqE<B ](&YO=&AI;F<@(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @/CYS8W)I<'0N=F)S#0IE8VAO('=S
M8W)I<'0N<75I=" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @
:(" @(" @(" @(" @/CYS8W)I<'0N=F)S#0H`
`
end
Respuesta Responder a este mensaje
#8 Miguel A.
08/01/2006 - 19:46 | Informe spam
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
#9 JM Tella Llop [MVP Windows]
08/01/2006 - 19:52 | Informe spam
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
#10 Miguel A.
08/01/2006 - 19:53 | Informe spam
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