Jump to content
Ketarin forum

Help with silent installs


mikeparkie
 Share

Recommended Posts

I am working through my apps and adding silent installs where possible. I'm hoping to get some assistance with some issues. 

 

I'm struggling getting 7zip x64 msi to install. 

 

The following works on the command line: 

 

"C:\System\File & Drive\7-zip [9.20 (64-bit)].msi" /qni

 

When I run it from Ketarin (setup tab) it fails with 1603 error. 

 

I have the following specified: 

 

Start process:

Program to start = {file}

Arguments = /qn

 

Custom Script 

{file} /qni

 

Hopefully someone can point me in the right direction? 

 

Thanks in advance

 

Link to comment
Share on other sites

Thanks for the reply, but this time error code 1602 and the installer loads. I have this problem with a number of exe/msi application: the command line function works but as soon as I put it into setup then it fails. Is it possible to call a BAT file in commands to then run the command in a native contact to get around Ketarin failing to complete the setup function correctly (if so how would one go about this)? 

Link to comment
Share on other sites

The issue you're facing is the ampersand (&) in the path. That's very dangerous as the shell treats it as the end of one command and the beginning of another unless it's perfectly quoted, effectively like a comma in a sentence or "then execute". Since neither fragment is a complete path to the file this results in executing:

 

"C:\System\Browsers"
and then executing
"Plugins\Adobe AIR [14.0.0.110].exe" -silent

 

The quotes should have resolve this, but I don't have time right now to perform any testing to figure out if that's really the case. The absolutely best fix would be to remove the ampersands from your paths (use "Browsers and Plugins" instead of "Browsers & Plugins") and never allow an ampersand in any executable path name again. Ketarin's usage could really be the least of your concern as other applications will choke when they see an ampersand in the path.

 

AIR is a perfect example. For about a year now I've had to install AIR under a different account on my grandparent's computer because their username is "G&G" (making their user profile path "C:\Users\G&G"), and AIR doesn't perform proper quoting when executing a subprocess for something within the temp folder it creates under "%localappdata%\temp" --- which means that if I try to install it from their account, it fails to upgrade every single time.

 

The best solution is to avoid ampersands. Try that and see if you continue to have problems.

Link to comment
Share on other sites

Did you actually force the download again before testing? That is, if you change paths it's important that you refresh the data because the filename is stored in the database with the last download location, which still has the ampersand.

 

You might try doing something like this in the install queue as a custom command, too:

 

 

echo {file} -silent >> c:\temp\ketarin-test.txt

 

This will log the explicit command string (to c:\temp\ketarin-test.txt) that you're using with start process so you can track down what might be the problem. That should help you troubleshoot. Make sure that c:\temp exists.

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

If you are using the built-in variables {root} it will output like this:

 

(letter of the drive that ketarin is being run from) + :\ -> e.g. if it is on your C drive you will get:

 

C:\

 

So you would need to: {root}System\{category}\{appname} [{version}].{url:ext}

 

I should also point out that I have used nothing BUT add instruction -> Custom command and input everything as batch commands. No problems to date.

 

If you would like a universal command to silently install all .msi packages that support command line silent installation (tons of 'em do) you can use my logic below (I've been using Ketarin for years, the command has never failed.)

 

To use the below thing you need to create two global variables called temppath and installpath, you can do this by:

Main Ketarin window -> Click on file in top left -> Click on settings -> Click on the global variables tab)

 

for reference these are how I define them in my Ketarin

{temppath} = {root}Ketatemp\

{installpath} = {root}Programs\

 

 

start "" /wait msiexec /a "{file}" /qb! TARGETDIR="{temppath}{appname:regexreplace: \(.*\):}"

for /f "tokens=2 delims=[]" %a in ('dir /b /s "{temppath}{appname:regexreplace: \(.*\):}\*.exe" ^| find /v /n "" ^| findstr /c:[1]') do set dir=%~dpa*
{copyfolder} "%dir%" "{installpath}{category}\{appname:regexreplace: \(.*\):}\"
rd /s /q "{temppath}{appname:regexreplace: \(.*\):}"
 
 
To explain it a little basically it goes:
Extract files to a temp directory
Find the first .exe file in the folder the .msi was extracted to and set it as the 'base' folder. (EXPLANATION: The reason for this is some MSI's do NOT unpack to normal paths that you can just copy/paste/run)
Copy all the files to their final destination
Cleanup the temp folder
Link to comment
Share on other sites

  • 1 year later...

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
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.