Install CAB file from FireFox or command line - windows

I have a CAB file that contains a few DLLs, and an OCX ActiveX control, an OSD describing the contents, and an INF for installing the DLLs and ActiveX control. These are coming from a 3rd party, so I can't control anything except how they are distributed to the client.
They are being used within a Java applet, and they work cross browser, but only IE seems to support actually installing the CAB file.
The installation is being done via:
<OBJECT classid="clsid:actual-class-id-here" NAME="name"
width="0" height="0" codebase="xxxx.cab#Version=w,x,y,z">
<param name="useslibrary" value="xxxx">
<param name="useslibrarycodebase" value="xxxx.cab">
<param name="useslibraryversion" value="w,x,y,z">
</OBJECT>
So, I need a way to install this CAB file that will work cross browser. Since the above will only work via IE, I need an alternative, or I need a way to install it from the command line, which would be a reasonable workaround (I could then set up an installer to take care of it). This needs to work on XP through Vista.
Any help would greatly be appreciated!
EDIT: Installing from command line would be much preferred, as then I could do a solution that isn't specific to IE, FireFox, or any other browser.

Ok, so I finally tracked down a website that gave something useful:
http://www.msfn.org/board/install-inf-file-c-t104891.html
And the resulting command I will likely use:
rundll32.exe advpack.dll,LaunchINFSectionEx .\xxxx.inf,,C:\path\to\xxxx.cab,4
Which I think will do exactly what I want. Now I just need to create a simple installer, and it should all tie together nicely!

Related

Comprehensive list of programs on different operating systems

How would I get a list of EVERY program into a text file for windows 95-windows 10. The uninstall programs in control panel doesn't have the version and publisher for the older operating systems, and wmic does not display every program. Even the uninstall registry, which I thought would be my savior, does not list every program. I can see discrepancies between that and the uninstall programs tab. Powershell and the like are off the table since it is relatively new.
Some combination of the following:
Enumerate registry for HKEY_CURRENT_USER\Software\Microsoft\CurrentVersion\Uninstall and HKEY_LOCAL_MACHINE\Software\Microsoft\CurrentVersion\Uninstall. And probably HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall on 64-bit os (might be duplicated). These are the list of installed programs that appear in the Control Panel's "Program and Features" section. Notice that some of the entries are straight-forward and have most of the data you want. Others are a GUID - this corresponds to an MSI installation.
For all the entries obtained in #1 that reference a GUID, use the MSI API to find the installation information you seek. Start with MsiEnumProducts. From there you can get at version info of installed applications.
Brute force search for EXEs installed in C:\Program Files and C:\Program Files (x86). For each EXE found, you can use this method to get the version information.
You want a list of applications installed from the Windows Store? Ask me for a code sample if that's important too.
The registry uninstall registration requirements in the 90's was just the display name and the command to start the uninstallation. Windows 2000 added support for more values and exposed them in the new UI but they were still optional. In recent years a couple of them became a requirement to pass the Windows Logo tests but they are still optional for non-certified applications so the uninstall key is not guaranteed to contain version/publisher information for every entry. Portable applications are not listed in the registry so if you need a inventory of everything then you need to inspect all exe files and ignore the registry.
Supporting everything back to Win95 RTM is going to be tough since you have nothing except batch files as a scripting option. VBScript is a optional component that normally gets installed with IE 4 and I don't even remember if it is possible to get Powershell on these systems.
I don't think it is possible to extract the version information with a simple batch file, you probably need the help of a 3rd-party tool. The issue with 3rd-party tools is that a lot of them depend on the Microsoft CRT run-time .DLLs and Windows 95 RTM does not have them out of the box, not even msvcrt.dll.
If you can raise your requirement for Win95 to have Windows Scripting Host installed (redistributable or part of IE4) then you could write a VB/Jscript file that uses the FileSystemObject to both walk the entire directory tree on every drive and to get version information from .exe files.
If that is unacceptable then you need to try to find a tool that can extract version information. There is a Microsoft tool named filever.exe listed here but I don't know if it works on Win95 and a NirSoft tool here but I'm not sure if it supports stdout redirection from the commandline (but it is open source so you could fix that if needed). Even if you find a suitable tool you would still need to walk the directory tree looking for .exe files and that is not going to be fun when you are limited to command.com and its DOS compatible batch handling.
My recommendation is to write a new application. I can't recommend writing it in a .NET language because you would be dealing with versions 1-4 and it is not installed on XP and older by default.
The way I see it, you have 3 options if you are writing it yourself: Visual Basic 6, Delphi (something old, v3 or older perhaps) or C/C++.
For C/C++ any version of Microsoft Visual C++ or MinGW/GCC will do but the older the better and you must not link to or use any C run-time library stuff (you might get away with static linking with MinGW but not recent versions of Visual Studio). If I was doing this I would use Visual Studio 6 or 2003 and build with /Zl & /NODEFAULTLIB. There are multiple small standalone CRT libraries if you need them. If you use any recent version of Visual Studio you will manually have to hex-edit the file to make it run on anything older than XP.
The actual implementation needs to call FindFirstFileA (and friends) on Windows 95/98/ME and FindFirstFileW on other systems to walk the directory tree and GetFileVersionInfoA/W (and friends) to get version info.
If you are feeling fancy you could perhaps filter out files in %WinDir% signed by Microsoft. Good luck...

Windows Mobile 6.5 Silent Uninstall

I would like to silently uninstall a Program that was installed from a CAB File with wceload.
This Program also appears in Remove Programs. Is there a way to uninstall with command line?
I have found this Xml Configuration but i dont understand how to execute this commands.
Is there a Program on Windows Mobile to run this XML Files?
I do not see the uninstall wap provisiong xml you need to uninstall an application automatically on the link you provided.
You need:
<wap-provisioningdoc>
<characteristic type="UnInstall">
<characteristic type="Application 2">
<parm name="uninstall" value="1" />
</characteristic>
</characteristic>
</wap-provisioningdoc>
see http://msdn.microsoft.com/en-us/library/gg155034.aspx
to process such xml you need either a mobile management framework or use a simple app that uses DMProcessConfigXML. See http://msdn.microsoft.com/en-us/library/bb158518.aspx. That means you need to write a little app that uses this API call.
On some devices (ie by Intermec) processing of xml is supported directly. For Intermec devices you just need to copy the xml to \Smartsystems\ConfigDir on the device.
From a PC you can use RAPIconfig to process such xml on a device using ActiveSync/WMDC. See http://msdn.microsoft.com/en-us/library/bb737308.aspx.

How to tell if a specific file extension has a default program to open it? e.g. PDF, in Windows 7

I want to know if there is a specific entry to check in the registry to see if there is a default program associated with a specific file type?
My main example would be a PDF. Documentation in my company is mainly PDF. We want to be able to distribute the latest Adobe Reader because, generally, a lot of the PCs using my company's software will not have access to the internet.
During installation, I want to be able to check if the computer we are installing on already has a program to view PDF files. If yes, carry on. if not, then run the Adobe distribution as part of the install.
I'm focused on Windows 7 PCs, registry entry(ies) I can read programatically to see if, as an example, PDF has a valid program to open it.
No this option not exists. Although HKCR\'PROGID'\shell\open may points to the installed software.
User MC ND have wrong answer. See my screenshot:
During installation, I want to be able to check if the computer we are installing on already has a program to view PDF files. If yes, carry on. if not, then run the Adobe distribution as part of the install.
So I have pdf reader (!!!) with no associations. MC ND you are still thinks, I have no pdf reader?
From console
assoc .pdf to get the "fileType" associated to the extension. Once you have the fileType (ex. AcroExch.Document.11):
ftype AcroExch.Document.11 to get the associated program.

How do I deploy my xcode webplugin for safari?

I have a c project built into a .webplugin that works when I install it manually (i.e. copy it to the Library/Internet Plug-Ins folder) but how do I get this to users who visit the web site most expediently? From my investigation it sounds like one must build an installer that a user must download (as with flash, quicktime).
-Is there any way for it to install via the browser (Safari) as Activex controls do in IE?
-If I must build an installer, how would I begin?
-If I must use an installer, is there any way to detect if the plugin is already installed so that I can prompt the user accordingly?
Thanks very, very much for your time. This has been such a thorn in my side!
Is there any way for it to install via the browser (Safari) as Activex controls do in IE?
No. IE no longer supports this behavior for ActiveX anyway, as allowing any web site to install software on a user's computer is a massive security vulnerability.
Note in general that requiring an Internet Plugin to view your site will end up turning away a lot of viewers. Unless your web application has some really unusual needs, I'd question whether this is necessary -- JavaScript is capable of some really impressive things nowadays.
If I must build an installer, how would I begin?
Start here: PackageMaker User Guide (Mac OS X Developer Library)
If I must use an installer, is there any way to detect if the plugin is already installed so that I can prompt the user accordingly?
If you build an installer using PackageMaker, I believe the installer will detect this situation automatically.

Manually Installing ActiveX component

I'm trying to view a surveillance camera system. The remote access is available through a website, and that website seems to need to download a CAB file full of goodies to let me view the cameras.
On some of my systems this install process goes over nicely.
On a few, particuarly the ones with slower Internet, I get into an endless-loop of: going to the page, waiting a long period of time (I assume this is where its downloading the CAB file), clicking yellow bar to allow it to "Install this CAB file for all Users" and the page reloading. It never pops up with the Window saying "Are you sure its cool to Install this stuff?"
Is there a nice way I can side-step this with a little code? I've downloaded the CAB file and extracted its contents. It's full of DLLs and a SetupScript.vbs. I've tried to just let the SetupScript.vbs run, and I've tried to manually register the DLLs with regsrv32. I've even copied the required .OCX and .INF files to the C:\Windows\Downloaded Program Files\ and modified the registry to mimick one where the install went smoothly.
Despite this, when I visit the webpage, it still takes forever and then goes back into the loop described above.
What APIs do I need to call to "properly" register this component so IE can see it? Or is there something more simple that I'm missing?
Could someone please point me in the right direction to solve this? The browser is IE8, the OS is Vista.
Thanks!
In Windows 7 64-bit I copied the OCX files to C:\Windows\SysWOW64 and then ran:
regsvr32 /s C:\Windows\SysWOW64\PLUGINNAME.ocx
The ActiveX plugin worked fine when I launched IE without prompting for an install.
Typo from above and i've noticed with some installations of Windows 8.1 you need to run regsvr32 from the sysWOW64 root folder:
%SystemRoot%\Syswow64\regsvr32 /s C:\Windows\SysWOW64\pluginname.ocx

Resources