Silent Executable Fixlet Troubleshooting

Hello,

I’ve been reading a lot of troubleshooting threads for running executables silently, but nothing I’ve tried has worked so far.

I have an executable that was made with VB so when you try to run “setup.exe” via the command prompt, it will give you an error. After some research into silently installing these types of executables, I found that if I change it to run from the directory with its dependencies as “setup.exe -sc:\install.log” it will run silently and also drop a log file in c:\ where it says what it installed. I’ve tried running this via command prompt on several different machines now, and it installs silently perfectly and as expected each time.

Now comes my dilemma: getting it to work in Bigfix.

I uploaded the folder that has the setup.exe as well as the dependency files through the Manage Software Distribution and level 0 compression. When I made a task, I input just the setup.exe -sc:\install.log that has worked for me. Bigfix then creates the typical .bat action script but also throws in a .sh action script in there as well. Not necessarily sure why, but I tried running it anyways.

Currently, the status hangs on “Running” and won’t run the setup.exe like I’d want. I also tried testing out doing something like the following that also just hangs:

//**Begin Preparation Marker
// Download all specified files
begin prefetch block
add prefetch item name=81297E236C0F5D6C2A8C8140C1D4778B5528400F sha1=81297e236c0f5d6c2a8c8140c1d4778b5528400f size=8737438 url=SWDProtocol://127.0.0.1:52311/Uploads/81297E236C0F5D6C2A8C8140C1D4778B5528400F/compressedPackageData-201902041343.bftemp.bfswd sha256=01542999700b53bb690dc1c1bac97ea14f2319aa2df4abd32eb415b8f8e62951
end prefetch block

// All SWD files will go into a folder in the clients __BESData folder. This folder gets cleared on every restart.
parameter “baseFolder” = “__Download/”
// Move files into subfolders and unescape file names
move “__Download/81297E236C0F5D6C2A8C8140C1D4778B5528400F” “__Download/compressedPackageData-201902041343.bftemp”

// extract any compressed files
extract “compressedPackageData-201902041343.bftemp” “{parameter “baseFolder”}”

waithidden __Download\setup.exe -sc:\install.log

I’m able to cd to that directory and run the setup.exe with the -sc:\install.log as expected, but for some reason I can’t get it to work within BigFix. Thoughts?

Thanks.

The two most frequent issues that generally come up, are that the BES Client is running the installation using the LocalSystem account, and the BES client is running in 32-bit mode.

The easiest way to test these is by using psexec from www.microsoft.com/sysinternals.

You’d use
psexec -i -s c:\windows\system32\cmd.exe to open a 64-bit command prompt and use that to see if your setup works ok using the LocalSystem account.

Next, try using
psexec -i -s c:\windows\syswow64\cmd.exe to see if it still works using the LocalSystem account in 32-bit mode.

Let us know whether either or both of these fail and we can help with workarounds for each.

2 Likes

I just ran the setup.exe -sc:\install.log through both and both installed without user prompts. I guess one thing of note is that it doesn’t seem to install completely silent. There is a window that pops up for about 2 or 3 seconds that loads some of the dependencies, but it never asks for user input.

Hmm, launching a window shouldn’t be a problem as long as it doesn’t ask for user input.

So it’s not one of the two common problems, guess we need to look at the less common ones.

As a guess, a few installers care about relative paths and working directories. You could test that by not being in the __download directory when you start the process. If it’s a really old installer, is it possible it chokes on spaces in the installer pathname?

I’d set up a directory path with spaces in it, put your installer in a subdirectory, and launch it that way. In the BED Client environment the working directory would be "C:\Program Files (x86)\Bigfix Enterprise\BES Client\__BESData\CustomSite_YourSiteName" , and it’s calling your setup.exe with the relative path __Download\setup

If that shows to be a problem, you could work around it in you action by building a batch file to run the install. You could either relocate setup.exe to something like c:\temp first so there are no spaces in pathname, or cd into the setup.exe directory so it is in the current working directory, or both.

If that doesn’t do it, the next step is probably to use procmon.exe (also from sysinternals) to watch what’s happening in setup.exe and see what’s different when BESClient runs it. (You’ve accomplished enough so far that I guess you are familiar with procmon ? )

Thanks for helping so much with this.

When you suggest not having it in the downloads folder, are you referring to extracting this folder to a different directory entirely and then trying to run the setup from there? And if I do extract the folder to a different directory, will the setup.exe need to have the path specified in the waithidden command? As in “waithidden %filepath%\setup.exe -sc:\install.log” ?

I’ve been trying a few other things locally to see if I can find other ways to install it silently, and interestingly enough, “setup.exe /silent” will install it the same way as above, but “setup.exe /s” will not unless I specify the install.log.

I’d try out the different path options with psexec first so we can try to figure out what the installer needs (as far as spaces in pathnames or current working directory).

If it’s just the working directory, then you could extract it as normal and then

delete __appendfile

appendfile cd __Download

appendfile setup.exe -sc:\install.log

delete test.cmd

move __appendfile test.cmd

waithidden cmd.exe /c test.cmd

Hi Jason,

I tried out appendfile like you suggested. I just changed it directly, so the action script now looks like:

//**Begin Preparation Marker
// Download all specified files
begin prefetch block
add prefetch item name=81297E236C0F5D6C2A8C8140C1D4778B5528400F sha1=81297e236c0f5d6c2a8c8140c1d4778b5528400f size=8737438 url=SWDProtocol://127.0.0.1:52311/Uploads/81297E236C0F5D6C2A8C8140C1D4778B5528400F/compressedPackageData-201902041343.bftemp.bfswd sha256=01542999700b53bb690dc1c1bac97ea14f2319aa2df4abd32eb415b8f8e62951
end prefetch block

// All SWD files will go into a folder in the clients __BESData folder. This folder gets cleared on every restart.
parameter “baseFolder” = “__Download/”
// Move files into subfolders and unescape file names
move “__Download/81297E236C0F5D6C2A8C8140C1D4778B5528400F” “__Download/compressedPackageData-201902041343.bftemp”

// extract any compressed files
extract “compressedPackageData-201902041343.bftemp” “{parameter “baseFolder”}”
// Log setup
parameter “mainSWDLogFolder” = "{parent folder of client folder of current site}/__Global/SWDDeployData"
folder create "{parameter “mainSWDLogFolder”}"
parameter “logFile” = “SWD_DeploymentResults.log”

//**End Preparation Marker
delete __createfile
parameter “logFolder” = “{parameter “mainSWDLogFolder”}”
// Run setup process
delete __appendfile

appendfile cd __Download

appendfile setup.exe -sc:\install.log

delete test.cmd

move __appendfile test.cmd

waithidden cmd.exe /c test.cmd
//**Begin Closing Marker
// Get the return code of the previous action.
parameter “returnCode” = “{exit code of action}”

// Task will now exit.
exit {parameter “returnCode”}
//**End Closing Marker

Unfortunately, it still hangs on “Running”. I’ve tried a few other variations using waithidden, wait, run, etc etc and still nothing yet. At this point I’m befuddled ha. I’ve been researching silently installing vb6 scripts, and I know the syntax is correct for the setup.exe -sc:\install.log, so I’m guessing it just has to be something with my action scripts that I’m missing but I’m not sure what since navigating to the directory and running as either 32 or 64 bit gets me what I want.

I do see a “setup boostrap for visual basic setup toolkit (32 bit)” running through Task Manager > Processes, which I’m assuming is this setup running.

Edit: After stopping that process, I then get a Completed with an Exit Code 1 and nothing has installed.

1 Like

Back from some more troubleshooting.

I threw the setup.exe and such in a .bat to run the .bat locally to see what happens. I found that it will pause on the “Search for app in the Store?” dialog box despite running the rest of the script silently. So now it looks like I need to find a way to stop that dialog box since I think that’s what was hanging up everything.

Other than the prompt, does the setup complete successfully? If that message comes at the end, you msy be able to work around it by using ‘run’ rather than ‘wait’, so the actionscript doesn’t wait for the batch to complete. Then you can pause the action for a couple of minutes, and try to kill the window that pops up (if you can get the process name that’s presenting it)

Hi Jason,

The message doesn’t come up when I run the batch from a System-level user. It does when I run from a local user account, that message does come up.