Page 1 of 1 1
Topic Options
#164123 - 2006-07-07 04:31 AM MSI - I wonder why ...
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
The vendor of a product we're checking out, has a GUI for building a .BAT file, that will start their MSI with all the required settings and parameters for a silent install ... thats all usefull and good but here's the thing...

At the beginning of their .BAT file, they coded this:

Code:

copy %windir%\system\msiexec.exe %windir%\system32\msiexec.exe /y

%windir%\system32\msiexec.exe -i ".\DesktopInstallation.msi" ..blah,blah



Its the copy thing I am scratching my head over ... anyone have a clue what they are trying to accomplish here ?

-Shawn

Top
#164124 - 2006-07-07 04:34 AM Re: MSI - I wonder why ...
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Ah I see I think, I missed the "system" to "system32" difference. Guess this is a Win9x versus NT support thing ?
Top
#164125 - 2006-07-07 06:34 AM Re: MSI - I wonder why ...
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: CA
Well that's dumb as heck. It doesn't need to be copied anywhere, you could run it from a newly created folder if you want.

You could also do If Exist or Check the OS version.
Poor coding overall

Top
#164126 - 2006-07-07 08:39 AM Re: MSI - I wonder why ...
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
Could simply do it from a search in both directories and use the path that was returned as result of the found msiexec and run it from there. Poor coding indeed.
Top
#164127 - 2006-07-07 11:13 AM Re: MSI - I wonder why ...
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, imho, batch files are processed in such a buggy way, depending on the OS version that the way it is now, is the only way to make sure it really works.
_________________________
!

download KiXnet

Top
#164128 - 2006-07-07 11:19 AM Re: MSI - I wonder why ...
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: CA
Not sure what you mean by that Jooel, unless you're meaning the way the underlying code in XP mangles it.

But that is a launch method and not how or what is called inside the batch file.

All they're doing is copying the file to another path that actually wouldn't even work if it was on Windows 9x it would fail because the SYSTEM32 folder does not exist and they don't create it first, so it would fail - so now that we know it would only work on NT/2K/XP/2003/VISTA systems the code is still useless and dumb from what I see.

Top
#164129 - 2006-07-07 01:09 PM Re: MSI - I wonder why ...
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
actually, system32 does exist.
iirc, some win9x update did create that folder.

and no, I don't mean no bloody xp launch shit but the fact that things like exist do not work reliably with batch scripts.
_________________________
!

download KiXnet

Top
#164130 - 2006-07-07 07:02 PM Re: MSI - I wonder why ...
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: CA
Quote:

things like exist do not work reliably with batch scripts




Hmmmm... well I'm open to learning more. I've used batch in the past for many years and never ran into a problem with using EXIST. Can you demonstrate or show some code where it fails please.


As for the SYSTEM32 I may be mistaken but aside from rouge applications that folder did not exist prior to Windows 98 (iirc). I think Microsoft introduced that folder on 98
I'll take a look at home where I have a clean install I think of both Windows 95B and Windows 98SE, however I still feel that that method could and should be written better.
 
Let's just say for the sake of argument that one or more systems in your organization had a SYSTEM folder from upgrades or something, and in that folder you did have MSIEXEC.EXE but it was version 1.2
Well then this batch comes along and then blindly copies that 1.2 version over the top of your MSIEXEC.EXE version 3.1 in the SYSTEM32 folder without ever checking the version or anything. Doesn't that raise a flag for you? Sure seems like poor coding choice to me.

copy %windir%\system\msiexec.exe %windir%\system32\msiexec.exe /y
 

Top
#164131 - 2006-07-07 09:33 PM Re: MSI - I wonder why ...
Jack Lothian Offline
MM club member
*****

Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
Hi Doc,

It so long that I can't be sure my memory isn't playing tricks but wasn't there some sort of 32 bit upgrade to Win9x. Didn't it create a system32 directory & install a 32 bit version of MS Freecell or maybe it was 16-bit & Win31? Or was it 32-bit TCPIP? I seem to remember this when I was working with Win95 but I could be confused.


Edited by Jack Lothian (2006-07-07 09:35 PM)
_________________________
Jack

Top
#164132 - 2006-07-07 10:12 PM Re: MSI - I wonder why ...
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: CA
Hi there Jack nice to hear from you.

Well what I think you're referring to was WIN32S which was a 32Bit API that could be installed on Windows 3.1 and was designed to allow Windows 3.1 16Bit OS to run "some" 32Bit applications. It did not create a SYSTEM32 folder though. Windows 95 used a Win32 API by default, but kept 16Bit functionality via Thunking and Realmode drivers.

Wikipedia shows FreeCell as this (so you were not far off - I just don't think/recall it created a SYSTEM32 folder)

Quote:

The game gained worldwide popularity thanks to Jim Horne, who learned the game from the PLATO system and implemented a version of the game with color graphics for Windows. It was first included with Microsoft Win32s as a test program, but was made a part of Windows 95 and has been included with every version of Windows since.






Though not really sure why I'm so concerned if it did or did not, as to me the real issue is that it's just poor coding plain and simple even if you do have a SYSTEM folder on 2K/XP
 


Edited by NTDOC (2006-07-07 10:29 PM)

Top
#164133 - 2006-07-11 04:21 AM Re: MSI - I wonder why ...
Jack Lothian Offline
MM club member
*****

Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
Hi Doc,

I did say it was a long time ago & that I may be combining multiple memories. It just goes to show our memories do play tricks on us. Anyways, it is good to hear from you too & you are as knowledgeable as ever. I sometimes think eveyone should visit this board, the range of knowledge on this board is quite remarkable. Every now & then I drop by just to read the chit-chat & I am always impressed that the old crew is still here & as active as ever. You guys are like a clutch of energizer bunnies.
_________________________
Jack

Top
#164134 - 2006-07-12 05:44 AM Re: MSI - I wonder why ...
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Does that mean you're going to join our next KiXgolf tournament?
_________________________
There are two types of vessels, submarines and targets.

Top
#164135 - 2006-07-13 02:46 AM Re: MSI - I wonder why ...
Jack Lothian Offline
MM club member
*****

Registered: 1999-10-22
Posts: 1169
Loc: Ottawa,Ontario, Canada
I would have like to but I am leaving on vacation on Saturday & I won't be near a computer for at least 2 weeks.

PS: I still have the directory on my machine from the last kixgolf, I participated in. I keep it hanging around because I keep hoping to get imvolved in the next Tournament.


Edited by Jack Lothian (2006-07-13 02:50 AM)
_________________________
Jack

Top
Page 1 of 1 1


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

Who's Online
0 registered and 661 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.071 seconds in which 0.031 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