Page 1 of 1 1
Topic Options
#208979 - 2014-06-03 05:33 PM kixtart in wpe
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I have a deployment setup where kixtart script is used to modify the setup process and do all sort of magic automatically based on some conditions and couple questions.

well. it seems that some parts of kixtart do not work in this environment, like @ipaddress0.

I am trying to spread out the load to include multiple geologically separated servers and need a way to determine the subnet of the station.

anyone have a nice solution?
_________________________
!

download KiXnet

Top
#208980 - 2014-06-03 06:52 PM Re: kixtart in wpe [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
ended up using wmi.
_________________________
!

download KiXnet

Top
#208982 - 2014-06-03 08:33 PM Re: kixtart in wpe [Re: Lonkero]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4567
Loc: USA
This also uses WMI...
GetIPOptions -
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=159170#Post159170

Top
#208992 - 2014-06-05 04:52 PM Re: kixtart in wpe [Re: Allen]
BradV Offline
Seasoned Scripter
****

Registered: 2006-08-16
Posts: 687
Loc: Maryland, USA
Only tested on XP, but not using wmi:

 Code:
ipconfig | findstr /c:"IP Address" > ip.txt
set /p ip=< ip.txt
for /f "tokens=2 delims=:" %a in ("%ip%") do set ipn=%a
for /f "tokens=* delims= " %a in ("%ipn%") do set ipnum=%a
for /f "tokens=1,2,3,4 delims=." %a in ("%ipnum%") do set ip1=%a&set ip2=%b&set ip3=%c&set ip4=%d

Top
#208993 - 2014-06-05 05:30 PM Re: kixtart in wpe [Re: BradV]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
yea. I was thinking about that, but did not want to use file write operations while in the ramdisk only stage.
_________________________
!

download KiXnet

Top
#208994 - 2014-06-05 07:05 PM Re: kixtart in wpe [Re: Lonkero]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
Have not tried to debug your batch code Brad but ran it and got the following.

ipa was unexpected at this time

Top
#208996 - 2014-06-07 07:47 PM Re: kixtart in wpe [Re: NTDOC]
BradV Offline
Seasoned Scripter
****

Registered: 2006-08-16
Posts: 687
Loc: Maryland, USA
Oh, I had just run that at the command line. I'm pretty sure if you are going to run it in a batch file, you have to double up on the percent signs (%%a for example).
Top
#208997 - 2014-06-07 07:54 PM Re: kixtart in wpe [Re: BradV]
BradV Offline
Seasoned Scripter
****

Registered: 2006-08-16
Posts: 687
Loc: Maryland, USA
OK, just checked. I was correct. Also, on Windows 8.1, need to search for IPv4 Address.
 Code:
ipconfig | findstr /c:"IPv4 Address" > ip.txt
set /p ip=< ip.txt
for /f "tokens=2 delims=:" %%a in ("%ip%") do set ipn=%%a
for /f "tokens=* delims= " %%a in ("%ipn%") do set ipnum=%%a
for /f "tokens=1,2,3,4 delims=." %%a in ("%ipnum%") do set ip1=%%a&set ip2=%%b&set ip3=%%c&set ip4=%%d
echo %ipnum%
echo "ip1=%ip1%"
echo "ip2=%ip2%"
echo "ip3=%ip3%"
echo "ip4=%ip4%"
This worked on Windows 8.1

Regards

Top
#208998 - 2014-06-09 08:38 PM Re: kixtart in wpe [Re: BradV]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
Works for me Brad
Top
#208999 - 2014-06-09 10:20 PM Re: kixtart in wpe [Re: NTDOC]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
not sure why, but now the ipaddress0 has started to produce an IPaddress...
_________________________
!

download KiXnet

Top
#209000 - 2014-06-10 05:06 PM Re: kixtart in wpe [Re: Lonkero]
BradV Offline
Seasoned Scripter
****

Registered: 2006-08-16
Posts: 687
Loc: Maryland, USA
What changed in your environment, or did Harry waive his wand? \:\)

I hate automagical. Something must have changed. Maybe some different firmware, a different patch level of the OS, etc?

Top
#209001 - 2014-06-10 11:17 PM Re: kixtart in wpe [Re: BradV]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I did add features to the script and feature packages to the winpe, to allow usage of the wmi method.

so many changes have taken place that I can't count, but just realised in a log output of a failing computer ipaddress0 was suddenly populated.
_________________________
!

download KiXnet

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 302 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.031 seconds in which 0.011 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org