-
Notifications
You must be signed in to change notification settings - Fork 427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Guide on EXE install scripts #22179
Guide on EXE install scripts #22179
Conversation
@spokanemac @eashaw Once published, this link should point to the article: http://fleetdm.com/learn-more-about/exe-install-scripts |
|
||
The use of scheduled tasks allows the installer to run with user-level permissions, which is especially useful when installing software for non-admin users without requiring administrator credentials at the time of execution. | ||
|
||
Since the installation is run by the current user, the script does not output the installer's messages to the console. If you need to see the output, you can modify the script to redirect it to a file and append it to the script output. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@getvictor, do you think it's worth mentioning how to capture the installer output? Something like: (I'm gleaning this from another PowerShell script I had)
To capture the installer output in a log file, modify the Start-Process section of the script like this:
$processOptions = @{
FilePath = $uninstallCommand
PassThru = $true
Wait = $true
RedirectStandardOutput = 'C:\Path\To\LogFile.log'
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To run as user, we are using a scheduled task, and not Start-Process
. I would need some time to figure out how to get logs from the task, and I wasn't planning on doing that as part of this issue. Let me know if you feel otherwise.
The bigger issue is that the user must be logged in, which makes user scripts unreliable. I filed a story for feature fest: #22200
@spokanemac Can you also review/fix the grammar in the install and uninstall (not remove) script comments at https://github.com/fleetdm/fleet/tree/main/pkg/file/scripts? Please keep the line width at 77 characters or less, since that is the width in the UI. |
@spokanemac Should we publish this now? |
@spokanemac just giving you another ping! Waiting on this guide to close out the user story: #20000 cc @getvictor |
For #20000 (4.57.0) --------- Co-authored-by: JD <[email protected]>
For #20000 (4.57.0)