Jump to content

[Solved] How do I use OCSetup.exe to install a MSI?


Recommended Posts

OK I cant make hear nor tales of this, what registry entries do I need to add so that all I have to do is run for example OCSetup Silverlight and have it install Silverlight.msi

Been reading about it in WAIK help files but cant figure it out

I tried placing the installer in %WinDir%\System32\SysMSI\Stage (also tried a \Silverlight sub folder) and tried adding different registry entries to HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup but have so far failed

any guidance is appreciated

Solved, see post

Edited by ricktendo64
Link to comment
Share on other sites


sometimes you have to go with what works and forget MS stuff. Their xml is not compatible with any xml editor I tried, whats up with that? Create their own rules and BS

I done the /qc and it uninstalled and then done the /q and it installed

Link to comment
Share on other sites

Maybe you can find some help here:

OCSetup Command-Line Options

http://support.microsoft.com/kb/936209/en-us

I don't know if that can help you, but the simple way is to install Silverlight like this:

Choose your language for the silent installation:

Example (French):

silverlight.exe /lang=1036 /q

Edited by myselfidem
Link to comment
Share on other sites

I have read those, those are what I cannot figure out

Silverlight is not important, its just and example

I've made an test with an component, "InboxGames": uninstall and install the same component with "OCSetup.exe" successfuly!

I've used the command prompt as administrator with the following command:

Uninstall the component:

start /w %windir%\system32\ocsetup.exe InboxGames /uninstall /passive /norestart

Install the component:

start /w %windir%\system32\ocsetup.exe InboxGames /passive /norestart

You can read the log file inside:

%Windir%\Logs\CBS\CBS.logs

Edited by myselfidem
Link to comment
Share on other sites

Their xml is not compatible with any xml editor I tried, whats up with that? Create their own rules and BS

The XML in the WIM format is actually compliant. However, any command you use to export it will put a text header in there that (technically) should be in a CDATA. So if you export it to TXT, take the header out and rename ext to XML, it will open in an XML editor. This comment is presuming we are referring to the same thing. :unsure:

Link to comment
Share on other sites

I am not talking about packages that are already included in the wim, I want to put a example.msi (Silverlight, AdobeReader, etc) somewhere on my hdd, then add the reg entries to register them with OCSetup (these reg entries are what I need help with/cant figure out) so when I run

start /w ocsetup Silverlight /passive

It will install/uninstall the application

I tried copyng the msi to %WinDir%\System32\SysMSI\Stage\ (with and without sub folders) and various other places on my HDD with no luck, also tried adding different reg entries mentioned in the WAIK help file with no luck either

Edited by ricktendo64
Link to comment
Share on other sites

Problem solved...the thing is I was reading the .chm witch (wrongly) stated the registry key is

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\OCSetup\Components

But after opening ocsetup.exe with bintext I found the correct registry key had a space between "OC" and "Setup"

post-98200-0-11079000-1290056076_thumb.p

Silverlight not only installs with the msi but it also patches it with the msp when I run

ocsetup Microsoft-Silverlight /passive

When used with the following reg entries to register it

;INF code
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\OC Setup\Components\Microsoft-Silverlight","Type",0x10001,1
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\OC Setup\Components\Microsoft-Silverlight","Component",,"%10%\SysMSI\Stage\Microsoft\Silverlight\silverlight.msi"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\OC Setup\Components\Microsoft-Silverlight","PatchFiles",0x10000,"%10%\SysMSI\Stage\Microsoft\Silverlight\Silverlight.msp"

Will have to do some playing around see what cool things I can do with this stuff, will play around with other installers like .NET4 see if I can get it to apply the MSP patches too ;)

BTW msi installers with custom setup.exe also work if you use /x: (read the waik chm to find out what I mean)

Edit: just found out it only works for MSI installers that are digitally signed by Microsoft

Edit2: I also notice it breaks Turn Windows features on/off GUI (I guess I need to give my custom Optional Component a name in the registry somewhere)

Edited by ricktendo64
Link to comment
Share on other sites

Problem solved...the thing is I was reading the .chm witch (wrongly)

.chm witch I have another word for that which starts with a b :lol:

Has lead me astray many times. MS don't have their ducks in a row with that reason I look for alternatives

Sometimes just as simple as that a space in something

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...