Trying to package a system/admin install for intune

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
JanVP
Posts: 6
Joined: Fri Aug 09, 2024 2:30 pm

Trying to package a system/admin install for intune

Post by JanVP »

-Trying "Everything-1.4.1.1026.x64.Lite-Setup.exe" and also with the files inside it.
(-IMO, the Lite's version system tray icon right-click actions could be even simpler.)
-I want to disable NTFS drives and end up with a blank folder list that users can fill themselves (with network drives) and store their settings and local database in appdata

-On my machine, I had good results with this command, even though "-choose-volumes" is not supposed to work with "-install-options"?
Everything.exe -install "C:\Program Files\Everything" -install-options "-app-data -choose-volumes -disable-update-notification -uninstall-desktop-shortcut -install-folder-context-menu -uninstall-quick-launch-shortcut -uninstall-run-on-system-startup -uninstall-service -uninstall-start-menu-shortcuts -install-all-users-start-menu-shortcuts -install-language 2067"
-Intune, however, made a Start menu shortcut to its own cached version of the executable.
-Using the setup one on my machine:
Everything-1.4.1.1026.x64.Lite-Setup.exe /S -install-options "-app-data -disable-run-as-admin -install-efu-association -install-folder-context-menu -uninstall-run-on-system-startup -uninstall-service -uninstall-desktop-shortcut -install-start-menu-shortcuts -uninstall-url-protocol" /D=C:\Program Files\Everything
-But then, of course, the app asks the NTFS question. Is there a way to merge config settings during a system/admin setup?
void
Developer
Posts: 19839
Joined: Fri Oct 16, 2009 11:31 pm

Re: Trying to package a system/admin install for intune

Post by void »

-On my machine, I had good results with this command, even though "-choose-volumes" is not supposed to work with "-install-options"?
-choose-volumes is an install option and can be used with -install-options.

-choose-volumes disables NTFS volumes and returns immediately.


-Intune, however, made a Start menu shortcut to its own cached version of the executable.
I don't know what Intune is doing internally.
Is it possible to pack the portable Everything.exe and have intune copy this to C:\Program Files\Everything and then call:

C:\Program Files\Everything\Everything.exe -app-data -disable-run-as-admin -install-efu-association -install-folder-context-menu -uninstall-run-on-system-startup -uninstall-service -uninstall-desktop-shortcut -install-start-menu-shortcuts -uninstall-url-protocol -choose-volumes

This is what my installer does internally.
A call to Everything.exe with any -install-option command line options will return immediately.


-But then, of course, the app asks the NTFS question. Is there a way to merge config settings during a system/admin setup?
Use -install-config in your install options:

Everything-1.4.1.1026.x64.Lite-Setup.exe /S -install-options "-app-data -disable-run-as-admin -install-efu-association -install-folder-context-menu -uninstall-run-on-system-startup -uninstall-service -uninstall-desktop-shortcut -install-start-menu-shortcuts -uninstall-url-protocol -choose-volumes -install-config ""c:\Program Files\Everything\myEverything.ini""" /D=C:\Program Files\Everything

-or-

C:\Program Files\Everything\Everything.exe -install-config "c:\Program Files\Everything\myEverything.ini"
JanVP
Posts: 6
Joined: Fri Aug 09, 2024 2:30 pm

Re: Trying to package a system/admin install for intune

Post by JanVP »

Thank you very much, sir. I'll try that on Monday.
JanVP
Posts: 6
Joined: Fri Aug 09, 2024 2:30 pm

Re: Trying to package a system/admin install for intune

Post by JanVP »

Today, I did not try to mimic the setup anymore and only packaged "Everything-1.4.1.1026.x64.Lite-Setup.exe" and ran that as a setup command with parameters. Should I reboot AFTER Intune installed the app? (Reboots seem to be needed to trigger Intune and avoid waiting.)

I had good results with this command, which includes only the four non-default parameters I want:

Code: Select all

Everything-1.4.1.1026.x64.Lite-Setup.exe /S -install-options "-app-data -uninstall-run-on-system-startup -uninstall-service -install-folder-context-menu -uninstall-desktop-shortcut -choose-volumes" /D=C:\Program Files\Everything
However, the fifth one (-choose-volumes) still fails. If I include it, the initial popup still shows. If not included, the same ini-settings appear in the appdata folder, although -appdata was not included.

After running "Everything.exe -choose-volumes", these user settings (in %appdata%) do get set correctly.

Code: Select all

auto_include_fixed_volumes=0
auto_remove_offline_ntfs_volumes=0
auto_include_fixed_refs_volumes=0
auto_remove_offline_refs_volumes=0
Where is the "-choose-volumes" setting stored? Registry? Not in the program folder, I checked. That one only has:

Code: Select all

app_data=1
run_as_admin=0
Is there an "all users" ini file? Would it help to reboot after installing?
(Explorer-integration seems to linger after uninstalling from control panel, even after reboot.
Update: That too was caused by Intune:

Code: Select all

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\Zoek Everything...\command
"C:\Windows\IMECache\a6773073-1aa3-4fe3-95fa-4876483f564f_1\Everything.exe" -path "%V"
)

Because I also want to set "hide_empty_search_results=1", I'll try to merge ini settings now.
Update: included "mySettings.ini" in package and tried both [-install-config ""mySettings.ini""] and [-install-config ""c:\Program Files\Everything\mySettings.ini""] - no dice.

Code: Select all

; Please make sure Everything is not running before modifying this file.
[Everything]
hide_empty_search_results=1
auto_include_fixed_volumes=0
auto_remove_offline_ntfs_volumes=0
auto_include_fixed_refs_volumes=0
auto_remove_offline_refs_volumes=0
Last edited by JanVP on Mon Aug 12, 2024 3:56 pm, edited 4 times in total.
void
Developer
Posts: 19839
Joined: Fri Oct 16, 2009 11:31 pm

Re: Trying to package a system/admin install for intune

Post by void »

However, the fifth one (-choose-volumes) still fails. If I include it, the initial popup still shows.
If I run your command from an admin powershell or an admin command prompt, Everything will silently install.

What popup is shown?
Maybe the extra -install-options command line is too long for intune? (226 characters)


Where is the "-choose-volumes" setting stored? Registry?
-choose-volumes sets the following values:

Code: Select all

auto_include_fixed_volumes=0
auto_include_removable_volumes=0
auto_remove_offline_ntfs_volumes=0
auto_include_fixed_refs_volumes=0
auto_include_removable_refs_volumes=0
auto_remove_offline_refs_volumes=0
These values are stored in your "user" Everything.ini
aka %APPDATA%\Everything\Everything.ini


Is there an "all users" ini file?
There is a "machine" Everything.ini
This file is stored in C:\Program Files\Everything


Would it help to reboot after installing?
A reboot is not necessary.
Please make sure Everything is not running before modifying the Everything.ini
Your Everything.ini is rewritten to disk when you exit Everything.


Because I also want to set "hide_empty_search_results=1", I'll try to merge ini settings now.
Update: included "mySettings.ini" in package and tried both [-install-config ""mySettings.ini""] and [-install-config ""c:\Program Files\Everything\mySettings.ini""] - no dice.
I'm guessing this file doesn't exist when Everything is installed?
Does intune support scripts?
Does intune unpack itself? can you reference your mysettings.ini with something like C:\Windows\IMECache\...\Everything.ini

I am going to study up on intune..
JanVP
Posts: 6
Joined: Fri Aug 09, 2024 2:30 pm

Re: Trying to package a system/admin install for intune

Post by JanVP »

Many thanks. I think we're nearing the root cause: default user settings.
(I used to be a programmer and still enjoy investigating issues like these.
Previously I packaged Adobe Reader for our organisation (although using the old GPO method and not Intune), which took quite a while but taught me a lot about default settings (which a user may later modify) and system settings they cannot.)

The popup I want to get rid of is (translated from Dutch):""Everything" needs admin rights to index NTFS volumes [...]", with 3 radio buttons. I want the bottom one: "Don't index NTFS volumes".

With Intune, you can install an app in System context (it's a toggle: System or User). If I omit Everything's "-app-data" and used the following command (definitely short enough), the user's ini file's still created in %appdata% the first time a user launches the app, although the NTFS-popup is not shown (which I cannot explain; maybe the app still launches as admin?):

Code: Select all

Everything-1.4.1.1026.x64.Lite-Setup.exe /S -install-options "-choose-volumes" /D=C:\Program Files\Everything
Probably also because Intune runs the installer with System rights, you end up with only these two system settings in the app folder's ini file:

Code: Select all

; Please make sure Everything is not running before modifying this file.
[Everything]
; settings stored in %APPDATA%\Everything\Everything.ini
app_data=1
run_as_admin=0
Afterwards each user can launch the app, which creates the (very long) ini file in their own Roaming folder. That one does not contain these two system settings.

Now, the main question: where can I specify default user settings? If I want "hide_empty_search_results=1" as default (but a user can later change/overrule this), I would expect adding that line to the app folder's ini file uses it as a starting point for a brand new user's ini file:

Code: Select all

; Please make sure Everything is not running before modifying this file.
[Everything]
; settings stored in %APPDATA%\Everything\Everything.ini
app_data=1
run_as_admin=0
hide_empty_search_results=1
Sadly, it does not. In the new (very long) user's ini file, that setting is present but still set to its default (zero).

Update: just found [Computer\HKEY_LOCAL_MACHINE\SOFTWARE\voidtools\Everything] - THIS is where the installation options are stored, as default starting points for the user's ini file. Is there a reason why the two-line-system-ini in the app folder exists? Would it help to choose either registry or that ini file?
IMO, parameters like "-choose-volumes" and "-install-config" should add settings to the registry or to the shared ini file in Program Files (maybe add a "default" section for clarity?), to be used each time a new user ini file is created (in %appdata%).

You wrote: "-choose-volumes sets the following values [...] These values are stored in your "user" Everything.ini aka %APPDATA%\Everything\Everything.ini".
That works perfectly as designed. Running this command in a user profile without ini file (in %appdata%), indeed creates a (long) user ini file with NTFS disabled. It does not open the app UI. When the user launches the app UI, the NTFS-popup does not show.

In summary:
-Running "Everything.exe -choose-volumes" *after* installation (but on a user profile without ini file) works fine. In addition to the four lines we already talked about, these seven also get cleared correctly when C-drive/NTFS is disabled:

Code: Select all

ntfs_volume_guids="\\\\?\\Volume{1a2b1b08-5970-4888-8682-d82996f9769e}"
ntfs_volume_paths="C:"
ntfs_volume_roots=""
ntfs_volume_includes=1
ntfs_volume_load_recent_changes=0
ntfs_volume_include_onlys=""
ntfs_volume_monitors=1

ntfs_volume_guids=
ntfs_volume_paths=
ntfs_volume_roots=
ntfs_volume_includes=
ntfs_volume_load_recent_changes=
ntfs_volume_include_onlys=
ntfs_volume_monitors=
-However: when I run the app (UI/frontend) while no user ini file yet exists, the app ignores the "InstallChooseVolumes=0" registry setting and behaves the exact same way as with "InstallChooseVolumes=1".
-I want to prevent that initial NTFS-popup, so that the user starts with a blank slate (not even C-drive)
-I'd also like a way to set other default user settings (e.g. "hide_empty_search_results=1"), preferably by merging ini files (whether or not they then get stored in the app's ini file; the one that currently has only two settings).
-I can live without getting the emty result screen, but I really want the "blank slate" (the "InstallChooseVolumes=0" registry setting) to work.

Many thanks again.
void
Developer
Posts: 19839
Joined: Fri Oct 16, 2009 11:31 pm

Re: Trying to package a system/admin install for intune

Post by void »

The Everything installer is unlikely to do what you want, please try installing with the portable version.

The installer will launch Everything after installation, even in silent mode.

I have made an installer that doesn't launch Everything in silent mode:
Everything-1.4.1.1026.x64.Lite.NOSILENTRUN-Setup.exe

The next installers built will no longer launch Everything in silent mode.



There's no way to specify the default user settings for Everything 1.4.
You will need to call:
C:\Program Files\Everything\Everything.exe -choose-volumes
for each user.
-or-
create an Everything.ini in %APPDATA%\Everything for each user:

Code: Select all

; Please make sure Everything is not running before modifying this file.
[Everything]
hide_empty_search_results=1
auto_include_fixed_volumes=0
auto_include_removable_volumes=0
auto_remove_offline_ntfs_volumes=0
auto_include_fixed_refs_volumes=0
auto_include_removable_refs_volumes=0
auto_remove_offline_refs_volumes=


Install with the portable version

Call the portable version with:
c:\tmp\Everything.exe -install "C:\Program Files\Everything"


Setup Everything with all your install options:
"C:\Program Files\Everything\Everything.exe" -app-data -uninstall-run-on-system-startup -uninstall-service -install-folder-context-menu -uninstall-desktop-shortcut -choose-volumes


This is the same as what the installer does.



Everything 1.5
The Everything 1.5 installer will not launch Everything in silent mode.
Everything 1.5 will also support Group Policies
New users will pull values from the Everything.ini in the same location as Everything.exe as you are expecting.
JanVP
Posts: 6
Joined: Fri Aug 09, 2024 2:30 pm

Re: Trying to package a system/admin install for intune

Post by JanVP »

I understand, thx for your effort and attention.
(I still don't understand why the app ignores the "InstallChooseVolumes" registry key, though.)

For now, I documented the (one-time) process steps users need perform. We'll see how that goes.

>> New users will pull values from the Everything.ini in the same location as Everything.exe as you are expecting.
Very interesting. Looking forward to its release!
Would you like people like me test it for package deployment using GPO and/or Intune?
void
Developer
Posts: 19839
Joined: Fri Oct 16, 2009 11:31 pm

Re: Trying to package a system/admin install for intune

Post by void »

(I still don't understand why the app ignores the "InstallChooseVolumes" registry key, though.)
The registry key InstallChooseVolumes is only used by the installer.
Silent mode will also use this key.
You can set this value before running the installer.

InstallChooseVolumes will only be set for the current user.
New users after the install will not read this value.


Would you like people like me test it for package deployment using GPO and/or Intune?
Thank you for your offer.
I would love to have you help test Everything 1.5. (GPO and Intune)
aaathemtheyzzz
Posts: 16
Joined: Wed Mar 04, 2020 10:23 pm

Re: Trying to package a system/admin install for intune

Post by aaathemtheyzzz »

I was try to install the portable version 1.4.1.1028. From the console as admin run:

Code: Select all

everything.exe -install "C:\Program Files\Everything" -install-config "C:\Program Files\Everything\Everything.ini" -enable-run-as-admin -install-run-on-system-startup -install-folder-context-menu
and get the Fatal error failed to copy everthing.exe: 32 on main.c(588) _main_do_command_line_installs() Image

The reason to try this is that when trying to install from any other folder exept from the "c:\program files\everything" the portable edition (which I was already copy everything.exe, everything.lng and my everything.ini to that installation folder), then at the HKLM Run key everything stores the console's current folder, lets say F:\mytemp, so the HKLM Run gets the entry F:\mytemp\everything.exe -startup and not the C:\Program Files\Everything\Everything.exe -startup which I was expecting.

How to install the portable edition to Program Files and get respect of my (long) Everything.ini so I don't had to change the settings from gui, edit loacation path inside everything.ini and/or registry? Do I have to install as a service?
Attachments
image.png
image.png (9.11 KiB) Viewed 16257 times
void
Developer
Posts: 19839
Joined: Fri Oct 16, 2009 11:31 pm

Re: Trying to package a system/admin install for intune

Post by void »

Error 32 is ERROR_SHARING_VIOLATION - The process cannot access the file because it is being used by another process.

This most likely means Everything is already running.
Either the GUI process is running or the Everything Service is running.

Please exit Everything before installing:
Everything.exe -exit


Please stop the Everything Service before installing:
net stop Everything




everything.exe -install
will do the above anyway.
So please check why Everything will not exit or why the service will not stop.



Installing as a service will not help.
aaathemtheyzzz
Posts: 16
Joined: Wed Mar 04, 2020 10:23 pm

Re: Trying to package a system/admin install for intune

Post by aaathemtheyzzz »

This most likely means Everything is already running.
No, certainly it is not running! Everything does not appear in Task Manager and it is not a service either. On a clean install first I create Everything directory at \Program Files and then I was copy Everything.exe, Everything.lng and the long Everything.ini there. I was try to simulate an inf through install by hand (eg. the CopyFiles & AddReg inf directives) because my inf file fail to install on automated install but install OK if it is run form console with rundll32 advpack.dll,LaunchINFSection etc.
I suspect the registry key InstallLocation that deleted on purpose from HKEY_LOCAL_MACHINE\SOFTWARE\voidtools\Everything because I don't know beforehand which exactly will be the "ProgramFiles" location (=aka, the InstallLocation) from inside an inf and want the everything.exe to provide the destination location, then it goes to crash because probably everything was trying to copy itself on the same location that was executed or a threadlock. In this case it is %ProgramFiles% folder.
Also If I was try to direct the everything portable executable to install itself as admin with its usual parameters it didn't obey the installation folder, so everything's registry HKLM..Run gets my current folder folder from which I was trying to install and not the destination folder eg. the %ProgramFiles%.
It is like an arbitary "setup.exe" program begging to install and install on the current position form which the setup.exe was running...
I'm not an expert but I think that a fuzzer could hit that point.

I think everything.exe -install will install also the defaults settings, but I don't want that because my Everything.ini has the "defaults". Anyway I was try to test this assumption today.
aaathemtheyzzz
Posts: 16
Joined: Wed Mar 04, 2020 10:23 pm

Re: Trying to package a system/admin install for intune

Post by aaathemtheyzzz »

I was try with -install and get this: .src\main.c(588): _main_do_command_line_installs(): Fatal error: Failed to copy Everything.exe: 32
image.png
image.png (6.89 KiB) Viewed 16143 times
Also when try to use my method of "unistall" which does not remove everything.db and everything.ini with:

Code: Select all

Everything.exe -uninstall-start-menu-shortcuts -uninstall-folder-context-menu -uninstall-run-on-system-startup -exit
The exit parameter does not work while all the other parameters uninstall shortcuts remove everything from HKLM..Run key etc. To get around this, first I was call everything.exe -exit and on a second command I give all the other parameters which work.

Another issue is that everything lock the volume when I was previously delete some files from it and I can't remove the disk by using the "Safely Remove Hardware" icon while at the same time the disk is optimized for quick removal. Even Unlocker 1.9.2 can't unlock it while it thinks that its unlock succeeded. Then everything does not respond or quit but it is not crashed as the icon stays on but can't handle any commands or show its menu. So I was forced to reboot every time I want to remove the disk. No other software was running form this disk as I had only explorer and I see no other hidden software in HKLM..Run or procexp.exe (sysinternals proccess explorer).

To get arround all of this and install it as I want, -eg. first copy my ready-made everything.ini, everthing.exe and exerything.lng etc. to %programfiles%\Everything folder-, I call it from HKLM..Runonce

Code: Select all

Everything.exe -install-all-users-start-menu-shortcuts -install-folder-context-menu -install-run-on-system-startup -enable-run-as-admin -disable-update-notification
This is the only way I find to install the portable edition and have all my own settings ready to go right from the start.
void
Developer
Posts: 19839
Joined: Fri Oct 16, 2009 11:31 pm

Re: Trying to package a system/admin install for intune

Post by void »

I think everything.exe -install will install also the defaults settings, but I don't want that because my Everything.ini has the "defaults". Anyway I was try to test this assumption today.
No Everything.ini is installed with -install

-install <install-location> does the following:
  • Relaunch as admin to do the install (relaunches the same Everything.exe with the runas verb and same command line with
    -runas
    appended)
  • Close existing GUI process
  • Stop Everything Service
  • Terminate any left over processes.
  • Copy source Everything.exe to <install-location>
    (this is failing for you with error 32)
  • Copy Changes.txt from the same location as the source Everything.exe to <install-location>
  • Copy License.txt from the same location as the source Everything.exe to <install-location>
  • Copy Everything.lng from the same location as the source Everything.exe to <install-location>
  • Everything 1.4: Copy Uninstall.exe from the same location as the source Everything.exe to <install-location>
  • Everything 1.5: Calculate the size of <install-location>
  • Setup HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\Everything
  • Setup HKLM\Software\voidtools\Everything
  • Launch <install-location>\Everything.exe with your -install-options (if specified)


Anti-virus or something else preventing the copy?
Can you manually copy %TEMP%\Everything.exe to C:\Program Files\Everything from a admin command prompt? -do you see a similar error?



Try launching %TEMP%\Everything.exe -install <install-location>
without any -install-options
Copy your Everything.ini
Then run any custom install-options.
(you might get multiple UAC prompts -one the -install and one for the install-options)



Everything.exe -uninstall-start-menu-shortcuts -uninstall-folder-context-menu -uninstall-run-on-system-startup -exit
Uninstalling is difficult.
The uninstaller will typically run as admin.
You will need to delete the Everything.db from %LOCALAPPDATA%\Everything for each profile.
Everything.exe -uninstall <install-location>
will try to do this.

Your command will just uninstall the start menu shortcuts, folder context menu and run on system startup system options.
All these settings cause Everything to return immediately.
The -exit option is not required and doesn't work because Everything returns immediately.


To get around this, first I was call everything.exe -exit and on a second command I give all the other parameters which work.
This is the workaround to get Everything to exit.


Another issue is that everything lock the volume when I was previously delete some files from it and I can't remove the disk by using the "Safely Remove Hardware" icon while at the same time the disk is optimized for quick removal. Even Unlocker 1.9.2 can't unlock it while it thinks that its unlock succeeded. Then everything does not respond or quit but it is not crashed as the icon stays on but can't handle any commands or show its menu. So I was forced to reboot every time I want to remove the disk. No other software was running form this disk as I had only explorer and I see no other hidden software in HKLM..Run or procexp.exe (sysinternals proccess explorer).
Everything will hold onto a volume handle to monitor changes.
Everything does register for device notifications and should release this handle when requested.
The notification is not always sent and Everything will get the blame for holding onto the handle.
aaathemtheyzzz
Posts: 16
Joined: Wed Mar 04, 2020 10:23 pm

Re: Trying to package a system/admin install for intune

Post by aaathemtheyzzz »

I'm on XP as administrator all the way from start. Copy by hand the executable does not have a problem. As said even consulting procep.exe in my previous post, there is no other programs running. Just a clean system without any drivers. I had sensed that you asked for antivirus as that kind of communication is a common practice in far too many forums which hang all those bad actors/agents/paid gov trolls etc. I think that's what you had in mind when you said "The internet has become a very hostile place." which surprise me and wonder how it is possible for Void to grasp it so late when I knew it for over twenty years. Εven they had photos back then for this kind or army dressed in uniform to operate from a C2 room.
I also check at a different XP machine and these exact commands copied from the console fail with the same error (32)

Code: Select all

C:\>cd %programfiles%\everything
C:\Program Files\Everything>Everything.exe -install "c:\Program Files\Everything\"
whatever everything.exe is running or not. Running from %temp% with all the install parameters worked as you desrcibed except the
Launch <install-location>\Everything.exe with your -install-options (if specified)
It does not launch or "execute" everything.exe and Everything.ini does not created anywhere.
Remember, I run portable version, so I don't want everything settings inside windows registry as I prefer everything.ini.
When run my kind of install through inf and because source files are not available as they are compressed I had no control of the source, and from inside inf I don't know where the source files are to execute everthing.exe from there with -install switch, not to mention that way, the registry modification with voidtools keys etc. My inf first copy everything.exe .lng and .ini to the destination and then call everything with the -install-all-users-start-menu-shortcuts -install-folder-context-menu -install-run-on-system-startup -enable-run-as-admin -disable-update-notification parameters from the destination.

I think I answer to my own question:
How to install the portable edition to Program Files and get respect of my (long) Everything.ini so I don't had to change the settings from gui, edit loacation path inside everything.ini and/or registry?
and eventually solve the fail (32) error by using cmd's start command. I will run a few more tests and very soon I will post the inf. ;)
(you might get multiple UAC prompts -one the -install and one for the install-options)
This reminds me the cookie problem they are once announced to get rid by eliminating cookies completely from the servers. It turns out that they choose their (always favorite) hypocritic solution to enforcing the cookie law which pass the responsibillity (and the required computer knowlege) to the users, after the fact. Now all our lives are filled with pop-up windows that simply require consent, which will pass as "permission" or "security"
The -exit option is not required..
I think this is needed to update everything.exe

Just chek the command from the %programfiles% alone (only the destination is %programfiles%\everything\ , not the source)

Code: Select all

Everything -install-run-on-system-startup -enable-run-as-admin -install "c:\Program Files\Everything\"
Everything files copied to %programfiles%\everything\ but everything.exe thinks that "-install-run-on-system-startup -enable-run-as-admin" parameters aren't part of the same command which concerns both

Code: Select all

-install-run-on-system-startup -enable-run-as-admin
and
-install "c:\Program Files\Everything\"
so, registry HKLM..Run get "C:\Program Files\Everything.exe" -startup which then it will try to run Everything form %programfiles% folder and not the %programfiles%\Everything. That's why I said
it didn't obey the installation folder
I think everything proccess the parameters one by one as a separate unit.
void
Developer
Posts: 19839
Joined: Fri Oct 16, 2009 11:31 pm

Re: Trying to package a system/admin install for intune

Post by void »

I also check at a different XP machine and these exact commands copied from the console fail with the same error (32)

Code: Select all

C:\>cd %programfiles%\everything
C:\Program Files\Everything>Everything.exe -install "c:\Program Files\Everything\"
Why are you trying to install Everything.exe to C:\Program Files\Everything when there is already an Everything.exe in this location?
Running Everything.exe from C:\Program Files\Everything and trying to install over itself will cause error 32.

The correct usage for -install is to run Everything.exe from the temp folder, when C:\program files\Everything doesn't exist:
C:\temp\Everything.exe -install "c:\Program Files\Everything"

c:\Program Files\Everything shouldn't exist or should be empty.

-install should really only be used by the installer.
The installer unzips Everything.exe to your temp folder then runs:
C:\temp\Everything.exe -install "c:\Program Files\Everything" -install-options "-enable-run-as-admin -install-run-on-system-startup -install-folder-context-menu"


Install options need to be passed with -install-options when using -install.
Otherwise, they are incorrectly executed for c:\temp\Everything.exe and not the installed location.



If Everything.exe is already copied to c:\Program Files\Everything, just run your install options directly:

"C:\Program Files\Everything\Everything.exe" -enable-run-as-admin -install-run-on-system-startup -install-folder-context-menu


No need to install Everything.
aaathemtheyzzz
Posts: 16
Joined: Wed Mar 04, 2020 10:23 pm

Re: Trying to package a system/admin install for intune

Post by aaathemtheyzzz »

void wrote: Tue Aug 26, 2025 2:05 am No need to install Everything.
I was abandon the -install swich. I isolate the issue.
Let me explain:
Assuming that everthing.exe is in %programfiles%\Everthing directory
please exit everything and create a batch with:

Code: Select all

cd %programfiles%\Everthing
Everthing.exe -startup
Now run that batch. What you notice?
Everything will start as expected but the console stays open forever waiting for everything.exe to "finish".

The same issue occur when I was try to setup everything from an inf which is part of my "install" procedure.
From my setupapi.log:

Code: Select all

-290 Processing REGISTERDLLS section [EEStart]. Binary: "%11%\cmd.exe", flags: 0x0000, timeout: 60s.
#E357 Registration of "C:\WINDOWS\system32\cmd.exe" appears to have hung.
#E291 Failed to register OLE server "C:\WINDOWS\system32\cmd.exe". Error 258: The wait operation timed out.
I now have finish the inf which has:
  • install and run everything executable
  • uninstall and exit everything
  • does not wait for the 60s timeout
My previous inf has only install which work only for paths wihtout spaces etc. I'll post the final version soon.
void
Developer
Posts: 19839
Joined: Fri Oct 16, 2009 11:31 pm

Re: Trying to package a system/admin install for intune

Post by void »

That's expected when calling an exe from a BAT file.

Use START to execute without waiting:

Code: Select all

cd %programfiles%\Everthing
START "" Everthing.exe -startup
aaathemtheyzzz
Posts: 16
Joined: Wed Mar 04, 2020 10:23 pm

Re: Trying to package a system/admin install for intune

Post by aaathemtheyzzz »

Here is the eeinst.inf. It can install Everything from console eg: rundll32.exe advpack.dll,LaunchINFSection eeinst.inf or by right click the Install verb on this inf file.
To install you need to have unpack Everything portable, your custom-made everything.ini with your keyboard shortcuts etc. together with this inf in some other directory eg. your_temp_folder. This inf will blindly install Everything in %programfiles%\Everything folder and it doesn't create entries in add/remove programs. Install will copy Everything.exe .lng and .ini to Program Files\Everything and then it start Everything from Program Files\Everything folder. It also place a HKLM..Run command as you see on first EEruncmds line.
To change the install directory eg: DefaultDestDir = 16422,"Everything" to DefaultDestDir = 16422,"MyEverythingFolder" you must change %16422%\Everything\ to %16422%\MyEverythingFolder\ on all other lines.
To uninstall run: rundll32.exe advpack.dll,LaunchINFSection eeinst.inf,EEUninstall
The Uninstall will stop Everything.exe and delete DelEEfiles files living no trace on everything in registry.

Code: Select all

[Version]
Signature = "$Windows NT$"

[DefaultInstall]
OptionDesc = "Everything Engine"
Tip        = "voidtools.com fast file search."
Modes      = 0,1,2,3
CopyFiles  = EEcopyFiles
;CopyFiles  = EEcopyFilesC
RunPostSetupCommands =EEruncmds
Uninstall =EEUninstall

;to use EEcopyFilesC comment exchange the two CopyFiles lines above and run this 4 batch commands
;makecab /D CompressionType=LZX /D CompressionMemory=21 Everything.exe eev14.ex_
;makecab /D CompressionType=LZX /D CompressionMemory=21 Everything.lng eev14.ln_
;makecab /D CompressionType=LZX /D CompressionMemory=21 Everything.ini eev14.in_
;del Everything.exe Everything.lng Everything.ini

[DestinationDirs]
;on XP 16422 is Program Files https://learn.microsoft.com/en-us/windows-hardware/drivers/install/using-dirids
;Use DefaultDestDir in order to work both EEcopyFiles and EEcopyFilesC
DefaultDestDir = 16422,"Everything"

[EEcopyFiles]
"Everything.exe"
"Everything.lng"
"Everything.ini"

[EEcopyFilesC]
"Everything.exe","eev14.exe"
"Everything.lng","eev14.lng"
"Everything.ini","eev14.ini"

[EEruncmds]
"""cmd.exe"" /q /d /c ""%16422%\Everything\Everything.exe"" -install-all-users-start-menu-shortcuts -install-folder-context-menu -install-run-on-system-startup -enable-run-as-admin -disable-update-notification"
"""cmd.exe"" /q /d /c start ""title"" ""%16422%\Everything\Everything.exe"" -startup"

[EEUninstall]
RunPostSetupCommands =rununinstcmds
DelFiles =DelEEfiles

[rununinstcmds]
"""cmd.exe"" /q /d /c ""%16422%\Everything\Everything.exe"" -uninstall-start-menu-shortcuts -uninstall-folder-context-menu -uninstall-run-on-system-startup"
"""cmd.exe"" /q /d /c ""%16422%\Everything\Everything.exe"" -exit"

[DelEEfiles]
;in case of reinstall just keep Everything.ini and Everything.db 
Everything.exe
Everything.lng
Post Reply