Install Direct X silently via WebInstaller in Inno Setup - windows

I'd like to install Direct X with a web-installer (to make my setup smaller) on a users machine using Inno Setup during the setup of my windows application. If possible, I'd like to do that conditionally, if Direct X is not installed. If also possible, I'd like to do that silently.
I couldn't find out a working way to do this so far - Microsoft seems to make this a bit hard. Can anyone point me into the right direction or describe how this is possible?
EDIT: A semi-working solution can be found here: http://www.vincenzo.net/isxkb/index.php?title=DirectX_-_How_to_detect_DirectX_version
FYI: After all, I just used the directxwebsetup.exe with the silent flag ("/Q"). When DirectX is installed, just a small GUI flashup is seen, and otherwise a DirectX install GUI opens and installs DX.

There is a good sample for detecting the .NET version on the ISXKB wiki. This can be expanded to use Nick Sherlock's InnoTools downloader to download it and you can then run it with the appropriate command line options to do it silently.

Related

Is there a "best" way to forcibly "uninstall" a product when the MSI fails during uninstall?

My install fails on uninstall because of a bug in my CustomAction. I've fixed the bug, but I now have a test machine with that product installed and I can't get it to uninstall (keeps rolling back and staying).
In the past (years ago), I used msizap.exe that comes with the Windows SDK. But it doesn't seem to come with it anymore. I installed it and can't find it. My only guess is that it's no longer relevant in Windows 10.
Anyway, is there a best way to forcibly remove the product so that Windows no longer thinks it's installed?
msizap.exe: You are correct, msizap.exe has been deprecated long ago.
Broken Uninstall Workarounds: This problem is very common. You can find a list of approaches for these kind of uninstall problems here.
The easiest and fastest is probably to just use the Microsoft FixIt tool to remove the package. This basically "unregisters it" by the looks of it, and is similar to msizap.exe in that regard.
If this is just a single machine you can hack the cached installation database using Orca (how to find cached msi path, powershell version, using Windows Explorer - point 2) - if it involves many machines you should make a patch. Please see details in link above.
Virtual Machines: It is obvious, but just to mention that you should check setups on virtual machines so you can just revert the virtual machine when you encounter "development and QA bugs" like these.
Custom Action Flag: You can also add a condition to each custom action so that you can disable the whole custom action from running by a custom command line sent to msiexec.exe.
If your flag is a property RUNCA="1", then you can disable it by setting this flag property to 0 via the command line - this is sort of a little inoculation for the package's uninstall feature breaking - you can disable custom actions from running at all during install / uninstall - it might even be useful for your tech-support guys and real-world installations:
msiexec.exe /x {PRODUCT-CODE} RUNCA=0

Windows App Certification Kit stuck at language select. Should I proceed manually?

The main window asks me not to interact, but it's not progressing at all - I've left it for over half an hour. My setup is made using Inno Setup 5.5.9. From what I understand the whole process should be automatic, but as you can see it's not working, and I'm not sure what to do now.
In case you want to do this in future (or for anyone else with the same issue who comes looking for this question) I did have a similar issue myself. I have no experience with Inno Setup but I used an MSI file created through a Visual Studio Installer project. It would get stuck on the first screen of the installer.
There should be a stage before the you start running the tests (the same stage when it asks for the file) when it asks for any parameters. I took this as an opportunity to include the same parameters I would use when running MSIExec.exe from the command line if I wanted an install to do a silent install (/qn). Presumably a passive install would have worked as well.
Looking at http://www.jrsoftware.org/ishelp/index.php?topic=setupcmdline, it appears Inno Setup should accept parameters such as /verysilent and /sp. I would expect these to have the same effect.

Automating Adobe Media Server install

everyone! I'm making an installer that is going to set a machine up for use of a piece of software. Adobe Media Server is one of the software requirements. I'm wondering if there's any way to automate the installation of it. I can, of course, open the wizard through a command line, but at that point, the user needs to be there to continue installation. I'm really looking for more of a "set it and forget it" type of solution. If anybody knows of any way this is possible, please tell me. I'm not finding anything online so far.
I'm assuming you are doing this on a Windows server, in which case you will have to do some heavy integration with the Adobe Media Server installer. A good open source tool for installer bundling would be Inno Setup. This is much easier to accomplish on a linux server, where you could execute a function within a script that downloads the installer, and extracts it with defined parameters. I believe the package name for a YUM install on linux is: AdobeMediaServer_5_LS1_linux64.tar.gz
You can search for any installers building tool which supports adding prerequisites and add the Adobe Media Server as a prerequisite to your installer. Also, you should configure your Adobe Media Server prerequisite to be installed with a silent/unattended command line.

Manual Cygwin Installation without using Setup.exe

I am having issues with finding all of the necessary files to actually install Cygwin correctly when not using the premade setup utility. The reason behind this is the fact that my company computer blocks the usage of the .exe, and won't give me clearance to install it, (they say it isn't needed for the job) but expects me to perform certain tasks that Cygwin would make much simpler.
So my question is thus; is there somewhere/someone that would have a list of packages that I would need to manually install from one of the mirrors to make Cygwin run correctly?
Well,
This is a new answer to an old question, but it might be helpful for someone...
Just run the installer with -B switch, for example:
setup-x86_64.exe -B
You should install it then on a path where you have rights.
If you don't need the full POSIX compatibility (which I'm guessing you don't, if the Unix subsystem isn't required for your job), I'd generally suggest you go with Mingw rather than Cygwin.
Sadly, Mingw also has an installer these days. It probably also requires admin (try it and see). However, you can download the individual components you need if you want to do it that way. That shouldn't require admin, so it would probably get you exactly what you want.
Mingw is also more corporate-friendly from a licensing standpoint, as its compiler doesn't render code built with it GPL like Cygwin's does.
Generally the rule is:
If you want to use Unixy tools to help with your native Windows development, you want Mingw.
If want to port a full (POSIX) Unix program to windows, you want Cygwin (and perhaps a support deal with Red Hat to get around the licensing problem).
There's a writeup on getting Cygwin [to work] on portable storage devices.
Boiling it down, you'd have to do this on a machine that does give you .exe/admin access to write to a 'stick, then run from the stick at work.
On the off-chance that super-lockdown-site allows you to run USB devices.
Use the GNUWIN32 utilities instead. http://gnuwin32.sourceforge.net/
That way you can choose only the .exe installs that you need, and it will be much easier to justify specific utilities than a humongous system install. If you hunt around on the site you can find the files directory where you can download a single utility, and if you get the -bin.zip version, then you can extract just the needed .exe file which would be even easier to justify and would not require your IT people to test an untrusted install package.
Stupid draconian rules or no, I would not recommend trying to thwart your employers rules. Try working to improve the situation or find another one.
But technically speaking if you can get a complete Cygwin install somewhere, you can copy the entire cygwin folder enmasse. There are a few things that you will want to change similarly to how I configured my cygwin installation to run from a thumb drive. I actually installed on my HD, copied it to the thumbdrive and then changed the batch file and a few other things to make it work. Here are the details: http://fadedbluesky.com/2011/portable-cygwin/
You could try installing it on another machine outside of work. After installing, copy the installed product's tree and Registry keys and environment settings to a CD or flash drive. Then you would have a DIY installation that you can copy and import settings manually. The installer doesn't do a whole lot else.
Don't count on job security if you're bypassing IT mandates after being explicitly told no, though. Getting an exception to the rule by submitting proper documentation through the proper process is usually the way to go.
You'll also have to hope that they aren't blocking the Cygwin programs and any Registry edits as well. It's not hard to find this sort of thing on a machine, either.

How to include INF driver install into VS Installer project

I use a Setup and Deploy project in Visual Studio 2008 to install my c# project.
I have a USB driver that i can manually install by right clicking the .inf file and choosing Install.
I think that if i had a .exe to install the driver, i could probably put it under Custom Actions. I'm not even sure where to start to make my own .exe, let alone if it would work.
I'm fairly new at this, having taught myself C# and learned how to make an installer through trial and error. I usually get by using trusty Google or this forum but i have trouble finding the information on my own this time.
Please help or point me in the right direction!
You can use run devcon.exe from a custom action to perform in the installation.
Here is some sample code from the Windows Device Driver Kit demonstrating devcon.exe's APIs... but it's probably easier to use the command-line functions.
I am working on exactly the same problem that you are working on. Please see my post:
http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/89c996c4-881b-47f0-815d-cf14135daf88/
I will let you know as soon as mine working. Please let me know as soon as yours working.
Thanks,
Trammy

Resources