https://github.com/osquery/osquery logo
#fleet
Title
o

Ojas

04/18/2023, 10:29 AM
while creating the agent can we change the path of the folder osquery is installed to? i am using fleetctl. When pushing new agent it fails and most likely error is that it sees the older folder is there and it is not able to replace it. So how do i change the path to different one like orbit2 or something
l

Lucas Rodriguez

04/18/2023, 4:19 PM
Hi @Ojas !
while creating the agent can we change the path of the folder osquery is installed to?
Currently, no.
fleetctl package
has paths hardcoded.
When pushing new agent it fails and most likely error is that it sees the older folder is there and it is not able to replace it.
We've recently released a fix that will make the installer remove any previously existing installation on Windows. But it probably works for new installs, not existing installs.
o

Ojas

04/18/2023, 4:21 PM
Hey @Lucas Rodriguez I am having issue with deployment of the updated package by intune. Because the path already exeists agent is not getting installed. <![LOG[[Win32App] Admin did NOT set mapping for lpExitCode: 1603 of app: 255bbb69-95ec-4d07-91ae-3fe8a898736e]LOG]!><time=“164134.3850981” date=“4-17-2023" component=“IntuneManagementExtension” context=“” type=“2” thread=“113" file=“”>
@Lucas Rodriguez how do i remove the existing ones and update the agent to new one 😐 ?
l

Lucas Rodriguez

04/18/2023, 4:24 PM
Good question. Does Intune allow removing directories?
AFAIK, the fix we recently added works moving forward (will not fix current installations.)
o

Ojas

04/18/2023, 4:25 PM
yea i tried doing it with a powershell script but it still throws the same error.
l

Lucas Rodriguez

04/18/2023, 4:25 PM
This is the issue we've fixed recently: https://github.com/fleetdm/fleet/issues/3563
Did you try (1) uninstall Orbit followed by (2) removal of the directory?
o

Ojas

04/18/2023, 4:27 PM
yea i altered the powershell provided for uninstall and it works in uninstalling. and removing the directly afterwards . but get same error. Maybe registry or other things are present?
l

Lucas Rodriguez

04/18/2023, 4:28 PM
What's the exact error? (Sorry, it's a big log file :)
o

Ojas

04/18/2023, 4:28 PM
Also when i am manully installing the new agent it uninstalls the older one and then throws error saying wasnt able to install.
then on second run it installs smoothly
l

Lucas Rodriguez

04/18/2023, 4:28 PM
Huh, ok, so it's not an issue with Intune
Can you share any logs you may find when installing manually?
o

Ojas

04/18/2023, 4:29 PM
So we shared the error code with microsoft as well and they came back saying because older agent is there so new is not installing
Let me try again instaling the agent and will capture the logs
l

Lucas Rodriguez

04/18/2023, 4:29 PM
OK, thanks!