Silent installation seems to have some issues.

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
DoTheEvolution
Posts: 6
Joined: Fri Sep 04, 2015 9:43 pm

Silent installation seems to have some issues.

Post by DoTheEvolution »

I am trying to make a powershell script to install Everything Search and to set some preferences.
Found some info on the subject but I feel like theres something not right.

Theres example code that suppose to give default installation, and while it seems to do things right there are some quirks.
  • first one is that during the installation info window about commands for everything opens for some reason
  • another thing is that even though the option -app-data is used and it does create Everything\Everything.ini in %appdata%, the checkbox inside the everything settings is unchecked
  • even during uninstall it acts like its not really installed in appdata and asks this strange thing
  • another thing is how to give it the settings I prefer. I assumed I just place custom Everything.ini in to appdata after the installation, but settings I set there like open on double click path, or enable filter, those are ignored in the program. But where are the settings then saved? Nothing in registry seemed like it.
I think maybe because its running as a service, that some issue come out of that with where the settings are stored.

Anyway, I just want to install Everything with the same defaults you get when you just click through GUI installer, plus some minor tweaks or preset toggle hotkey.

Thanks.
void
Developer
Posts: 16672
Joined: Fri Oct 16, 2009 11:31 pm

Re: Silent installation seems to have some issues.

Post by void »

Could you please send the command lines you are using to silently install "Everything"?

I believe there might be an issue with the -install-options command line you are using.
If an invalid command line is passed to -install-options you will get the command help notification during installation.

The unable to save settings dialog is odd for Everything.exe -uninstall-user
Settings should not be saved to disk with this command line option.. I'll have to look into this more..
DoTheEvolution
Posts: 6
Joined: Fri Sep 04, 2015 9:43 pm

Re: Silent installation seems to have some issues.

Post by DoTheEvolution »

from the first link

Code: Select all

Everything-Setup.exe /S -install-options "-app-data -disable-run-as-admin -disable-update-notification -install-efu-association -uninstall-folder-context-menu -uninstall-quick-launch-shortcut -install-run-on-system-startup -install-service -install-service-port 15485 -install-start-menu-shortcuts -uninstall-url-protocol -language 1033" /D=C:\Program Files\Everything
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Silent installation seems to have some issues.

Post by NotNull »

(1)
I think this has to do with the "-install-service-port 15485" parameter.

In a previous version (long ago) Everu=thing used the loopback adapter (localhost IP + port) to communicate with the Everything service. In current versions, Everything communicates through named pipes.
That's some technical blabla you can forget right away, but the important part is that the "install-service-port" is no longer valid (it isn't listed in the command line options window you see after installation)
Just leave that option out.


I have never used the installer, so next comments are a bit common sense, combined with a lot of guessing ..

(2)
You install Everything as an administrator. It will create an Everything.ini in it's appdata folder (c:\users\administrator\appdata\roaming\Everything\Everything.ini)

If you run Everything as a "normal user", it has no specific Everything.ini, other than some basic settings from the central c:\program files\Everything\Everything.ini.

How you can get a predefined Everything.ini for you "normal user" account, I wouldn't know.
I do know that if you create an Everything.ini with just the non-default settings, Everything uses that and creates a complete INI from that.
I wrote a little (Powershell) script to get these non-default settings out of a "normal" INI ( viewtopic.php?t=6285 )
Configure Everything to your liking and compare the resulting INI to a default INI. Deploy the differnces.
Maybe that is a way to solve that.


(3) I *think* you can do a simple uninstall.exe /S for a silent uninstall. That would uninstall the administrator's INI, but I guess it will leave the INI and database of "normal user" in place.

(4) As a normal user you can't talk to the specific parts of Windows where the file and folder information is located. You need to be an administrator for that. Or ...
you install the Everything service. It has also access to these parts of Windows. You (normal user) talk to the Everything service, the service gets the file and folder info for you. That's all the service does ( a bit like a child, asking a grown-up to buy some liquor, because the child itself is not allowed)


HTH.

BTW: I like the way you posted your issue. Very clear and all information one needs.
DoTheEvolution
Posts: 6
Joined: Fri Sep 04, 2015 9:43 pm

Re: Silent installation seems to have some issues.

Post by DoTheEvolution »

Theres this thing called chocolatey, kinda like linux repos for software for windows

I checked out chocolatey script for installing everything, heres powershell code

it seems like they just let the installation run with /S flag and nothing else
and afterwards run everything.exe from installed location with --diable-run-as-admin
and probably some other flags that start with -install-<some variables looped that I dont see>

it works when I install everything from choco repository
On my own, when I go for /S flag and only disable-run-as-admin it almost work, except asking for installation of service or runnig as admin on first startup

when I after the installation use this, it seems to be working alright, but no time to really test much for now

Code: Select all

echo ' - installation in progress ...'
Start-Process -FilePath "$parent_dir\Everything-1.4.1.877.x64-Setup" -ArgumentList '/S' -Wait

$target_exe = "$env:ProgramFiles\Everything\Everything.exe"
Start-Process -FilePath $target_exe -ArgumentList '-disable-run-as-admin','-install-service' -Wait
no time to test much setting files either, but there is something fishy, the X,Y of coordinates change in appdata ini file when I move window around
but I change some settings, back up that file, reinstall everything, put the file back, and settings of previous installation seem to be ignored, forgotten

I used everything to look for everything.ini and only short one in program files and one in appdata exist on the system...
DoTheEvolution
Posts: 6
Joined: Fri Sep 04, 2015 9:43 pm

Re: Silent installation seems to have some issues.

Post by DoTheEvolution »

Ok, this code seems to be working

Code: Select all

$parent_dir = Split-Path $MyInvocation.MyCommand.Path

echo ' - installation in progress ...'
Start-Process -FilePath "$parent_dir\Everything-1.4.1.877.x64-Setup" -ArgumentList '/S' -Wait

$target_exe = "$env:ProgramFiles\Everything\Everything.exe"
Start-Process -FilePath $target_exe -ArgumentList '-disable-run-as-admin','-install-service' -Wait

echo ' - copying config files'
$target_dir = "$env:APPDATA\Everything"
robocopy $parent_dir $target_dir Everything.ini
Seems the installation is same as default one when clicking through.
And my previously mentioned issues of config ini file seemingly not getting applied was just me being stupid and letting everything run in tray
I even went and stop service but to just end it in tray was apparently too difficult concept to grasp
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Silent installation seems to have some issues.

Post by NotNull »

According to the deployment topic you linked, you don't have to include installation options that are default.
And all your options are default, so a simple /S should indeed suffice.

But ...

I thought it would be better to check out the installer (although briefly), instead of speculating and guessing.
Turns out that the assumption above is not correct. At least not for the current version of Everything. You need more than just /S:
- if you don't specify the -install-service parameter, the service will not be installed
- if you don't specify the -disable-run-as-admin parameter, run as admin will be enabled (run_as_admin=1 in Program Files\..\Everything.ini )

I could get the desired (by you) results with this command-line:

Code: Select all

Everything-1.4.1.877.x64-Setup.exe /S -install-options  "-install-service  -disable-run-as-admin  -appdata"
After this install, you can just start Everything.exe (without further parameters) as a normal user.


Remarks:
- The USER Everything.ini (%appdata%\Everything\Everything.ini ) will be written when you completely exit Everything. So if you used Everything to find the INI and it's the first time you startde Everything, you will not find *your* INI
- My assumptions were (surprisingly!) accurate (the (1), (2) and (3) from my first post)
- the /S parameter is case sensitive
- In Menu:Tools > Options > General, the Store settings and data in %APPDATA%\Everything is textual not completely correct: the data (the database) ends up in the %LOCALAPPDATA%\Everything folder. Just a FYI; not very important IMO
NotNull
Posts: 5458
Joined: Wed May 24, 2017 9:22 pm

Re: Silent installation seems to have some issues.

Post by NotNull »

Cross-post! You posted, while I was writing mine :-)

You don't need to copy the " central" Everything.ini to the " user.ini". It contains different settings.
When you start (and exit) Everything, an INI will be created in the userprofile
Post Reply