Wait/WaitHidden/Run - EXE/BAT - Parameters

Hi, I have been through several posts and have personally tried to play around with a lot of things to test Silent install and otherwise;
Here is my problem: I am installing CCleaner507.exe (example); i have tested this with adobe reader, photoshop, etc.
Here is what i did:
-UAC disabled; I would not want to do this; Pls. recommend otherwise.
-Tried the command in debugger; Starts properly and gives me the prompts; i tried with wait & run;
-I tried waithidden, but that simply forces the setup into a state where i assume it is asking for me to select options but is hidden and gets hung; - i do not know the options for forcing a YES to all and avoid license.
-Since i am a noob, i tried running simple commands like run cmd.exe; run test.bat; evrything works; specially the bat file goes ahead and creates test files i have asked it to create;

  • I was even able to download the installer files from internet using action scripts and BAM!!! nothing happens after it; Do not get me wrong; I understand the reason; The exe launches as SYSTEM user. But what now? How do i proceed

I have seen some threads but none of them are tried and tested; I cannot believe that installing exes is not something which is popular or tired thoroughly in this community; Please push me in the right direction.

I forgot to mention; If possible, i do not mind giving the end user a prompt to accept; Of course, this user will have the rights; But at this time, i just want to get it to work.

Found the solution!! And i believe it was due to my ignorance. Every single executable has its very own switches; I was looking for generic solutions which do not exist. For example, ccleaner has a simple *.exe /S to do a silent install. I still want to see if there is any way at all to push an interactive install to a user; Its just a matter of research or someone experienced.

However, there is absolutely NO NEED to disable UAC; At least for the things i tested. Some forums have recommended such things; Its DANGEROUS :angry:
It would however be great if people have some special experiences if they can point me towards

1 Like

There are tons of examples of installing EXEs silently here: http://bigfix.me/

There are different installer types for different EXEs with different silent installer switches. For some programs, you need to know more than just the normal silent install switch, but also how to specify some required parameters as well.

Most EXE installers are of a few different types and once you know the type, then you should be able to figure out the silent install switches for that type of installer.

Your first step should always be to figure out how to silently install the software from the command prompt, not from the debugger or task or BAT file. Once you figure out the command line options needed, then you should be able to replicate that in a task using actionscript waithidden.

I do not disable UAC and I haven’t come across any cases where I must. The BigFix agent runs in the SYSTEM context and UAC does not affect it.

If I am working with a new EXE installer and I do not know the type, I upload it to virus total and it will give me an analysis of the file, which typically includes the type.

Example:

Here is an open source alternative to CCleaner that has a command line interface:
http://katana.oooninja.com/bleachbit/sf/BleachBit-1.6-setup.exe

I didn’t know the installer type, so I uploaded it to virus total:
https://www.virustotal.com/en/file/935ece8fa5c9bb5f449d6994c7a98d390213bad429466ffa28c06438ed9dad09/analysis/#item-detail

In the virus total analysis, it mentions NSIS, which is the Nullsoft Scriptable Install System:

I then looked up the silent install switches for NSIS based EXE installers, which is /S
http://nsis.sourceforge.net/Docs/Chapter3.html#installerusagecommon

I was then able to construct a complete task for installing BleachBit using BigFix: http://bigfix.me/fixlet/details/6079

1 Like

Excellent point about virus total. I use it all the time, but never thought abt using the packer info for the switches.
your response really helps me for the future deployments since now i know better specially the confirmation abt UAC.

On a side note, i did see that some users leverage waithidden cmd.exe /C “loc of file\setup.exe” /Switches. However, some use waithidden “loc of file\setup.exe” /Switches;

Is there a big difference explicitly invoking cmd vs directly executing the exe?

Finally, my last question is about MSI only because i personally didnt test it; Will MSI execution be exactly the same? or do i need to write waithidden msiexec /i setup.msi?

Appreciate your time.

Usually you do not need:

waithidden cmd.exe /C

There might be rare cases where you do, but most of the time I end up using it, it turns out I didn’t need to.

Here is an MSI example: http://bigfix.me/fixlet/details/3954

I created this new tip based upon this post, which I plan to expand and update over time: Creating an installation task for a new EXE installer

1 Like