Jump to content

Media Connect


andrewpayne

Recommended Posts

Here is my solution to this whole thing. I still have 'System Restore' disabled thru the registry tweaks run via cmdlines.txt But then I have incorporated 'System Restore' Enable & Disable in my start.cmd

My start.cmd entries:

Ignore this. Nilfred's method below solves the problem

Link to comment
Share on other sites


As I learn from bitmonster here is a small guide how to create your own silent install package:

  1. Get the Windows Media Connect package in your native tongue and put it in some folder.
  2. Get 7-Zip and install it. Open up the folder where 7-zip has installed itself to and grab the 7za.exe and 7zS.sfx files and copy them to your folder. You can deinstall 7-Zip now if you want.
  3. Get the UPX-package (Win32 console version), unpack it and copy the upx.exe to your folder
  4. Get the StartX-package, grab the StartX.exe out of the archive (you find it in the 'Release' folder) and move it to your folder.
  5. Make a new batch-file in your folder, name it wmc.bat and paste the following text into it:

SET TmpDir=%~dp0tmp
SET BuildDir=%~dp0build\
%~d0
CD "%~p0"
MD "%BuildDir%"
COPY StartX.exe "%BuildDir%StartX.exe"

SET Target=wmcsetup
CALL :make_tmp

SET MsiName=
FOR %%I in (*.*) DO IF /I "%%~xI" == ".MSI" SET MsiName=%%I
START /wait msiexec /a "%MsiName%" TARGETDIR="%BuildDir%" /QB
CD..
RMDIR /S /Q tmp

CD "%BuildDir%"
SET RedistFile=
FOR /R %%I in (wmfdist??.exe) DO SET RedistFile=%%I
CD..
MOVE "%RedistFile%" .

SET Target=wmfdist95
CALL :make_tmp

CALL :make_7z
RMDIR /S /Q tmp

ECHO;!@Install@!UTF-8!>config.txt
ECHO RunProgram="wmsetsdk.exe /DisallowSystemRestore /WMFDIST /Quiet /R:N">>config.txt
ECHO;!@InstallEnd@!>>config.txt

CALL :make_exe
MOVE %Target%7.exe "%RedistFile%"
DEL %Target%.exe

SET Target=wmcsetup
CD "%BuildDir%"
CALL :make_7z
RMDIR /S /Q "%BuildDir%"

ECHO;!@Install@!UTF-8!>config.txt
ECHO RunProgram="StartX.exe /WAIT \"msiexec /i %MsiName% /qb\"">>config.txt
ECHO;!@InstallEnd@!>>config.txt

CALL :make_exe
GOTO:EOF

:make_tmp
MD "%TmpDir%"
START /wait %Target%.exe /Q:A /C /T:"%TmpDir%"
CD "%TmpDir%"
GOTO:EOF

:make_7z
..\7za.exe a "%~dp0%Target%.7z" -r -mx=7 -mfb=255 -md=48m *
CD..
GOTO:EOF

:make_exe
IF NOT EXIST 7zSC.sfx upx.exe 7zS.sfx -o7zSC.sfx
COPY /b 7zSC.sfx + config.txt + %Target%.7z %Target%7.exe
DEL config.txt
DEL %Target%.7z
GOTO:EOF

Now you should have the following files in your folder:

wmcsetup.exe
7za.exe
7zS.sfx
upx.exe
StartX.exe
wmc.bat

Start the wmc.bat and wait 3 minutes. At the end you should have a wmcsetup7.exe in your folder with a size of about 4.7 MB.

You can run this standalone file through svcpack.inf or any other batch without any commandline switches. But if you use a batch instead of svcpack.inf you should use the start-command:

start /wait wmcsetup7.exe

Also place care to run it after WMP10 setup, and start WMP10 before try to start WMC or errors may occur.

wmc.bat.txt

Link to comment
Share on other sites

@Sanjay That's a working workaround, but ideally we would rather not have to enable it... Until I get around to have a patched and properly working msi installer, I got nothing better to offer  :(

Actually it turns out that this is not much of a workaround anyhow and it still brings up the silly 'System Restore' message. :(

I don't understand why it does not work though, when I try it in an existing Windows install it works fine, but during the unattended install it does not work for some reason.

Link to comment
Share on other sites

@Nilfred

Your method seems to work just fine but won't know for sure until a real unattended install.

Thanks a ton.

Update: Works fine in a VMWare install. Now to test on a real PC.

Update 2: Works fine in a real unattended install on a real PC.

Link to comment
Share on other sites

How does one get this to install completely silently. What I mean is without seeing the install process. I would like to be able to have it install without seeing the extraction windows etc. Is this even possible?

Thanks.

Link to comment
Share on other sites

@Sanjay

Thanks for the report.

Is still not possible to hide the extraction process with 7zip. Any suggestion is welcome.

@crahak

The batch also repack wmfdist95.exe after the AIP to do the trick.

I don't use WinRar because it's not free as 7zip.

Link to comment
Share on other sites

can this unattended (no system restore prompt) media connect installer work under svcpack.inf? thanks. :D

I don't think that would be a good idea, since this requires Media Player 10 to already be installed before this. Therefore you might be better off installing it via start.cmd that is assuming you are installing Media Player 10 thru start.cmd also.

Link to comment
Share on other sites

Thanks, Nilfred, for your guide. As I mentioned to you in a PM, I was "inspired" by your code to create a similar solution, using free Microsoft tools. Following is "my" answer to this problem.

As stated elsewhere in this thread/forum, the "System Restore" message is caused by the Windows Media Redistributables included with Windows Media Connect. Specifically, WMFDIST95.EXE. This is the package that required re-packing.

I have attached my WMC.CMD file that will create a new, optionally silent WMC package. The resulting file, WMC.EXE, is created using IEXPRESS, and is of similar format to standard Type II Hotfixes. That is to say, it requires the /Q:A /R:N switches to run silently. Otherwise, you will be prompted to confirm installation. Even when prompted, this package can be installed with System Restore disabled. In order to create this package, you will need these three files in a single directory:

  • WMC.CMD (Attached to this post)
  • WMCSETUP.EXE (The Windows Media Connect Installer)
  • CABARC.EXE (Microsoft's CAB compression utility)

Simply run WMC.CMD from this directory, and the new installer, named WMC.EXE will be created.

The WMC.CMD file performs the following steps:

  • Extracts the Install Files from WMCSETUP.EXE.
  • Creates the Adminstrator Install Point from the MSI file extracted.
  • Extracts the files from the WMFDIST95.EXE Redistribution file.
  • Repacks the WMFDIST95.EXE Redistribution file adding the /DisallowSystemRestore switch.
  • Compresses the whole Administrators Install Point into a CAB archive.
  • Creates an IExpress Installer with the Adminstrators Install Point and CABARC (for de-compression) and the required commands.

The resulting file is named WMC.EXE, and can be treated as any Type II Hotfix.

Thanks, Nilfred, for doing the grunt work!

WMC.CMD

Link to comment
Share on other sites

You're welcome!

IMMO you must provide a link to download cabarc.exe. :unsure:

I found it in my system at "c:\Archivos de programa\IEAK\tools\cabarc.exe" so I no bother to google for it :P

Had this new build been tested to work under svcpack.inf? Peeking into your code I don't think so (msiexec will not run), but I have no time to test it until next weekend :}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...