#164123 - 2006-07-07 04:31 AM
MSI - I wonder why ...
|
Shawn
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
|
|
|
|
#164125 - 2006-07-07 06:34 AM
Re: MSI - I wonder why ...
|
NTDOC
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
|
|
|
|
#164130 - 2006-07-07 07:02 PM
Re: MSI - I wonder why ...
|
NTDOC
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
|
|
|
|
#164132 - 2006-07-07 10:12 PM
Re: MSI - I wonder why ...
|
NTDOC
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
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
1 registered
(StuTheCoder)
and 798 anonymous users online.
|
|
|