Page 1 of 2 12>
Topic Options
#19427 - 2002-04-03 04:57 PM HELP : How to determine IE langue ??
cellnet Offline
Starting to like KiXtart

Registered: 2002-02-26
Posts: 115
Loc: Sweden
Hello
see below link for details: (thanks)
http://81.17.37.55/board/ultimatebb.php?ubb=get_topic;f=1;t=003748

Problem.
The new hotfix from microsoft concerning IE 5.0 5.5 6.0 needs to be applyed.

Im using the linked script and its working perfect.

Is it possible to determine the installed langue on IE. ?

Keyboard langue do not help.

\erik

Top
#19428 - 2002-04-03 05:03 PM Re: HELP : How to determine IE langue ??
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Does this cut it ?

$LANG = GETFILEVERSION ("C:\Program Files\Internet Explorer\iexplore.exe","language")

-Shawn

Top
#19429 - 2002-04-04 11:43 AM Re: HELP : How to determine IE langue ??
cellnet Offline
Starting to like KiXtart

Registered: 2002-02-26
Posts: 115
Loc: Sweden
Thanks , works perfectly.
Here is the code

; Checks location for client
call "\\semoheat\packages\script\kix\location.kix"

; Path to MS patchar
$path="x:\install\patchar\microsoft\internet explorer\28 March 2002 Cumulative Patch for Internet Explorer\"

; REM ** Local variables in use by this function are:
Dim $RC1, $RC2, $RC3, $TmpLen1, $TmpLen2, $TmpLen3
Dim $IEBuild, $IEFullVer, $IEMajor, $IEMinor, $IESubBd, $IEVer, $IEName
$RC1 = ReadValue ("HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer", "Build") ; REM ** IE3 onward (s/b build only, or xxxxx.xxxx)
$RC2 = ReadValue ("HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer", "Version") ; REM ** IE4 or later only (s/b xx.xx.xxxx.xxxx)
$RC3 = ReadValue ("HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer", "IVer") ; REM ** IE3 only (s/b xxx)
$TmpLen1 = Len ($RC1)
$TmpLen2 = Len ($RC2)
$TmpLen3 = Len ($RC3)
Select
Case ($TmpLen1 = 10) AND (SubStr ($RC2, 4, 1) = ".") ; REM ** IE6 - MS error w/IE 6 where minor id is single charcter
$IEMajor = SubStr ($RC2, 1, 1)
$IEMinor = SubStr ($RC2, 3, 1) + "0"
$IEBuild = SubStr ($RC2, 5, 4)
$IESubBd = SubStr ($RC2, 10, $TmpLen2-9)
$IEFullVer = $IEMajor + "." + $IEMinor + "." + $IEBuild + "." + $IESubBd
Case ($TmpLen1 = 14) OR ($TmpLen2 >= 11) ; REM ** IE6/IE5/IE4 - 14 is MS error w/IE 5.01 SP1 for Win2K, >=11 for various IE5, IE4 versions not 14-character
$IEMajor = SubStr ($RC2, 1, 1)
$IEMinor = SubStr ($RC2, 3, 2)
$IEBuild = SubStr ($RC2, 6, 4)
$IESubBd = SubStr ($RC2, 11, $TmpLen2-9)
$IEFullVer = $RC2
Case ($TmpLen1 >= 3) AND ($RC3 = "103") ; REM ** IE3 - the build number only
$IEMajor = "4"
$IEMinor = "70"
$IEBuild = "$RC1"
$IESubBd = ""
$IEFullVer = $IEMajor + "." + $IEMinor + "." + $IEBuild
Case (1)
$Status = $Skip
$wri = WriteLine (1, "Verified IE not installed." + $CR)
Return
EndSelect
; REM ** Determine exact version installed on system, set shorthand value to group 'like' versions (See MS TechNet article Q164539)
Select
Case ($IEFullVer >= "6.00.2600.0000") $IEVer = "6.00" $IEName="Internet Explorer 6"
$LANG = GetFileVersion ("%PROGRAMFILES%\Internet Explorer\iexplore.exe","language")
If $LANG="041DSwedish"
Shell "$path\swe\6.0\q319182.exe /q"
goto slut
EndIf
Shell "$path\eng\6.0\q319182.exe /q"

Case ($IEFullVer >= "5.50.4807.2300") $IEVer = "5.50 SP2" $IEName="Internet Explorer 5.5 Service Pack 2"
$LANG = GetFileVersion ("%PROGRAMFILES%\Internet Explorer\iexplore.exe","language")
If $LANG="041DSwedish"
Shell "$path\swe\5.5 SP2\q319182.exe /q"
goto slut
EndIf
Shell "$path\eng\5.5 SP2\q319182.exe /q"

Case ($IEFullVer >= "5.50.4522.1800") $IEVer = "5.50 SP1" $IEName="Internet Explorer 5.5 Service Pack 1"
$LANG = GetFileVersion ("%PROGRAMFILES%\Internet Explorer\iexplore.exe","language")
If $LANG="041DSwedish"
Shell "$path\swe\5.5 SP1\q319182.exe /q"
goto slut
EndIf
Shell "$path\eng\5.5 SP1\q319182.exe /q"


Case ($IEFullVer >= "5.00.3315.1000") $IEVer = "5.01 SP2" $IEName="Internet Explorer 5.01 SP2 (Windows 2000)"
$LANG = GetFileVersion ("%PROGRAMFILES%\Internet Explorer\iexplore.exe","language")
If $LANG="041DSwedish"
Shell "$path\swe\5.01 SP2\q319182.exe /q"
goto slut
EndIf
Shell "$path\eng\5.01 SP2\q319182.exe /q"

Case ($IEFullVer >= "5.00.3314.2101") $IEVer = "5.01 SP2" $IEName="Internet Explorer 5.01 SP2 (Windows 95/98 and Windows NT 4.0)"
$LANG = GetFileVersion ("%PROGRAMFILES%\Internet Explorer\iexplore.exe","language")
If $LANG="041DSwedish"
Shell "$path\swe\5.01 SP2\q319182.exe /q"
goto slut
EndIf
Shell "$path\eng\5.01 SP2\q319182.exe /q"


EndSelect

:slut

? $IEFullVer+" "+$IEName
Sleep 5

Exit

***

Only one problem left, get the client to reboot when finished

Thanks for the quick reply

Regards

\erik

Top
#19430 - 2002-04-05 12:48 AM Re: HELP : How to determine IE langue ??
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
that you can do with change...
change your shell call to run.
then after the run statement:

do sleep 1
until not setfocus("Microsoft Internet Explorer Update")
$x=sendkeys("{enter}")
exit 0

this waits until the question for reboot comes up, answers yes and exits kix.
the setfocus text used is probably dependent on the language packet used.
I used the english one.

cheers,
_________________________
!

download KiXnet

Top
#19431 - 2002-04-04 04:21 PM Re: HELP : How to determine IE langue ??
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Why not use the following under Windows NT/2K/XP:
code:
$retcode=shutdown('','Rebooting '+@WKSTA+' after installing mandatory software updates',10,1,1)

_________________________
There are two types of vessels, submarines and targets.

Top
#19432 - 2002-04-04 05:08 PM Re: HELP : How to determine IE langue ??
cellnet Offline
Starting to like KiXtart

Registered: 2002-02-26
Posts: 115
Loc: Sweden
Got a little problem with both suggestion

lonkero: Same text is displayed during installation phase (file copying) as when it has finished.
Changed the text to the following

[swedish]
Do Sleep 1
Until NOT SetFocus("Datorn måste startas om innan inställningarna börjar gälla")
$x=SendKeys("{enter}")
Exit 0

then it works / thanks

sealeopard:
How to tell the shutdown command to wait, untill the installtion is finished ?

Regards

\erik

Top
#19433 - 2002-04-04 05:33 PM Re: HELP : How to determine IE langue ??
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
he forgot to try it out before replying.

but good to here that it works.

cheers,
_________________________
!

download KiXnet

Top
#19434 - 2002-04-04 07:47 PM Re: HELP : How to determine IE langue ??
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
The folowing line will install the patch and return to the scritp only after completion
code:
Shell '%COMSPEC% /e:1024 /c START /MIN /WAIT "'+$path+'\eng\5.01 SP2\q319182.exe" /Q:A /R:N /N:V'
$retcode=shutdown('','Rebooting '+@WKSTA+' after installing mandatory software updates',10,1,1)

I use the shotdown command quite extensively in my maintenance script. Based on a flag the reboot routine will be triggered at the end of the script. you can find my reboot routine here: RebootWarning() at http://kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=12&t=000140

[ 05 April 2002, 16:27: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#19435 - 2002-04-04 09:00 PM Re: HELP : How to determine IE langue ??
cellnet Offline
Starting to like KiXtart

Registered: 2002-02-26
Posts: 115
Loc: Sweden
the reboot routine sounds good. Do you have a sample on the *.ini file.

Kix always wait until the "run" "shell" command has ended.

Is it possible to get all fixes etc to be installed, and then make one reboot.

ex code [first install]

; Checks location of the computer
call \\semoheat\packages\script\kix\location.kix

; Adding %COMPUTERNAME% to "My Computer"
WriteValue("HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}","LocalizedString","Den här Datorn %COMPUTERNAME%","REG_SZ")

;Converting file system to NTFS
SHELL "%COMSPEC% /c convert c: /FS:NTFS"

; Compatwrk batch file addes to RunOnce
WRITEVALUE ( "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce", "Compatwrk", "\\semoheat\packages\script\cmd\Compatwrk.cmd", "REG_SZ" )

; Installing Centuri Uppdated version
SHELL "x:\install\centuri\Centuri4.2.8.exe"

; Installing Hotfix for IE 6.0 (q319182.exe)
run "x:\install\patchar\microsoft\internet explorer\28 March 2002 Cumulative Patch for Internet Explorer\swe\6.0\q319182.exe /q"

; Installing LANDesk
SHELL "\\semoheat\ldlogon\ipsetup.bat"

*

Several of this "actions" requires user input. !!
One major reboot would be nice

Can I force(sendkey) to a Dos window (convert:NTFS) ?

A lot of can I? [Smile]

\erik

Top
#19436 - 2002-04-04 09:34 PM Re: HELP : How to determine IE langue ??
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
sealeopard,
how can you say that without trying.
I tryid and it didn't work that way... sorry...
_________________________
!

download KiXnet

Top
#19437 - 2002-04-04 10:29 PM Re: HELP : How to determine IE langue ??
BrianTX Offline
Korg Regular

Registered: 2002-04-01
Posts: 895
Microsoft Q patches for IE come with the standard MS installer switches. Generally, you can append the command lines like this:
q319182 /Q:A /R:N /N:V

The /Q:A is for quiet administrative mode which means NO prompts OR dialogue boxes in most cases.

The /R:N tells it to never reboot.

The /N:V forces the install in case the active setup says it's installed already although file versions may have changed.

I use it this way and then can force a reboot with the script later on.

BrianTX

Top
#19438 - 2002-04-04 10:32 PM Re: HELP : How to determine IE langue ??
BrianTX Offline
Korg Regular

Registered: 2002-04-01
Posts: 895
If you're curious about more command line switches for customizing the way the install package runs, you can find it in microsoft knowledgebase article Q197147.

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q197147

I hope this helps.

BrianTX

Top
#19439 - 2002-04-04 11:13 PM Re: HELP : How to determine IE langue ??
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Lonkero:

Where did I go wrong in that piece of code?
The first line is just an enhanced version of what cellnet wrote in his code. I just preceeded it with '%COMSPEC% /e:1024 /c START /MIN /WAIT ' to force Kixtart to absolutely wait until the patch install is finished. The location of the patch is in double quotes in case $path contains a pathname with spaces in it. Which part didn't work for you?
_________________________
There are two types of vessels, submarines and targets.

Top
#19440 - 2002-04-05 12:41 AM Re: HELP : How to determine IE langue ??
BrianTX Offline
Korg Regular

Registered: 2002-04-01
Posts: 895
I was thinking about using convert.exe without forcing the user to answer "y"... This might work:

1. Create a text file answer.txt
2. put just a "y" and a carriage return in it.
3. execute the line as follows:

convert.exe D: /FS:NTFS < answer.txt

I've found that you can often create an answer file that works so long as the command doesn't clear the keyboard buffer before asking for user input.

Brian

Top
#19441 - 2002-04-05 09:39 AM Re: HELP : How to determine IE langue ??
cellnet Offline
Starting to like KiXtart

Registered: 2002-02-26
Posts: 115
Loc: Sweden
thanks brian

where do you put the answer file ?

\erik

Top
#19442 - 2002-04-05 10:22 AM Re: HELP : How to determine IE langue ??
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
sealeopard, your code wasn't wrong in syntax way, but the exe does not quit without user input.
that's wrong.
but if you add - thanks to brian - switch /R:N to end of the line it will work just as you said.

cheers,
_________________________
!

download KiXnet

Top
#19443 - 2002-04-05 04:27 PM Re: HELP : How to determine IE langue ??
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Thanks, Lonkero. I wasn't aware of the new silent install syntax. I thought it was still just a /q for silent install of fixes, but I hadn't used it in a long time.
_________________________
There are two types of vessels, submarines and targets.

Top
#19444 - 2002-04-05 05:29 PM Re: HELP : How to determine IE langue ??
cellnet Offline
Starting to like KiXtart

Registered: 2002-02-26
Posts: 115
Loc: Sweden
thanks everbody

final script:

Case ($IEFullVer >= "5.00.3314.2101") $IEVer = "5.01 SP2" $IEName="Internet Explorer 5.01 SP2 (Windows 95/98 and Windows NT 4.0)"
$LANG = GetFileVersion ("%PROGRAMFILES%\Internet Explorer\iexplore.exe","language")
If $LANG="041DSwedish"
shell "$path\swe\5.01 SP2\q319182.exe /Q:A /R:N /N:V"
Goto slut

EndIf
shell "$path\eng\5.01 SP2\q319182.exe /Q:A /R:N /N:V"
Goto slut



EndSelect

:slut

; Startar om datorn.

If @INWIN=1
$retcode=Shutdown('','Rebooting '+@WKSTA+' after installing mandatory software updates',10,1,1)
Else
; canot get anything else to work reliably on Windows 9x
$retcode=runonce('0-Reboot','%WINDIR%\shelldll SHELL.DLL,RestartDialog',1)
EndIf

Exit

*
Looks like the "shell" command waits until its finished before proceding

*
Have a nice weekend

\erik

Top
#19445 - 2002-04-05 05:39 PM Re: HELP : How to determine IE langue ??
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Erik

Your statement:

goto slut

is interesting. Not too sure about your neck of the woods, but around here, this statement has some very funny implications.

Kix on my brother !

-Shawn

Top
#19446 - 2002-04-05 05:57 PM Re: HELP : How to determine IE langue ??
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Erik:

Two comments:

If $path contains a pathname with spaces in it then your path statement might break. It would be better to have the complete filename enclosed in double quotes to prevent this from possibly happening. This would be safe to use:
code:
Shell '"'+$path+'\swe\5.01 SP2\q319182.exe" exe /Q:A /R:N /N:V'

Secondly, yes, the SHELL command is supposed to wait for the shelled out command to finish before continuing as is documented in the manual. Unfortunately, I had a couple of instances where install routines consisted of multiple nested executables in which case the SHELL command failed to wait for the last executable to finish. It waited for the first one to finish. The 'START /MIN /WAIT' forces the shell command to wait independent of how many nested executables there are.

[ 05 April 2002, 17:58: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 2 12>


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

Who's Online
0 registered and 583 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.077 seconds in which 0.029 seconds were spent on a total of 12 queries. Zlib compression enabled.

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