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
MSI installer: Add checkbox and MSI property DISABLE_TELEMETRY to optionally disable telemetry. #10725
MSI installer: Add checkbox and MSI property DISABLE_TELEMETRY to optionally disable telemetry. #10725
Conversation
…ionally disable telemetry. Not ticked by default, i.e. telemetry is still on by default.
@bergmeister this looks promising :-) |
assets/Product.wxs
Outdated
Before="DisableTelemetry" | ||
Sequence="execute" | ||
Value=""[$(var.ProductDirectoryName)]pwsh.exe" -NoProfile -ExecutionPolicy Bypass -Command "[\[]System.Environment[\]]::SetEnvironmentVariable('POWERSHELL_TELEMETRY_OPTOUT', '1', [\[]System.EnvironmentVariableTarget[\]]::Machine)"" /> | ||
<CustomAction Id="DisableTelemetry" |
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.
Can we use an Environment element
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.
Good idea, I'd have to look into it in more detail.
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.
Would the environment element be able to undo the change to env variable on uninstall?
Slightly off-topic: Because preview and stable use the same environment variable, I am wondering if there is a case where a user would want to turn telemetry off only for stable but allow for preview. WDYT? @kilasuit
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.
Its possible that could be a potential use case though that should I think be asked in another issue
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.
We would need a new feature in PowerShell for per channel disable. @JamesWTruher should be involved in that.
@kilasuit Please see my 2 recent review comments. I thought the change was easy to make but it turned out to be more complex than I initially thought and wasn't always working as expected, hence why it is still in draft, but thanks for the ping as I haven't looked at it for a few months. |
…o disable_telemetry_option_msi
…o disable_telemetry_option_msi
Update: I still need to fix the build failure due to the missing component registration (trivial but not on a PC atm) but apart from that I don't plan to push too many more changes. |
This is the final implementation and it's ready to be merged. I've tested it and scenarios are:
|
cc @joeyaiello to review the language |
my response to the tool-tip for telemetry is that it is over long and over wrought. The whole reboot pending sentence seems unneeded. Also, it's very engineer centric - we should be redirecting to documentation so those that want more information can get it. I think that we need to short 2 sentences: Processes may need to be restarted for the setting to take effect. See for more information. My use of may is deliberate. We needn't talk about |
Fair point @JamesWTruher about it being the message being to technical. Because not many people read the tooltip, I thought I'd be very explicit but I went a bit overboard with it but WiX/MSI at least provides line wrapping in case there is not enough horizontal space.
|
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.
@bergmeister We need some time to review internally for some compliance issue(s). Sorry, the timeline on these things are unpredictable.
@heaths Can you please review as well from a WiX point of view. I see in your recent PR you removed some of the GUIDs but in this case, WiX would complain when removing the GUID or using an autogenerated one... |
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
Never ending story ... how serious is this whole debacle? I started another issue at least 3+ years ago about opt-out being ignored - and this is still the case: I can post Netlimiter prompts from pwsh.exe process to whomever is interested. It would be cool if someone could explain to me what the problem is and why its taking you guys so long |
This comment was marked as off-topic.
This comment was marked as off-topic.
So how about it NOW? |
This comment was marked as spam.
This comment was marked as spam.
I've pinged the PM team to get the compliance review to happen. |
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
Compliance has approved the wording, should be good to merge |
Note to test this with silent update |
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.
Why use two different variables if you're setting it on install and defaulting the old property based on the previous setting? The separate variable is unnecessary. Just have the search populate it. If someone passes the DISABLE_TELEMETRY
property it will take precedence anyway.
This reverts commit 12efbf7.
@heaths I think it was fine before looking at the tests. Some of the other properties, need the search pattern, but this one seems to persist even without the search, and I think simpler is better. |
@TravisEz13 didn't you still want to read the telemetry setting into |
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
@heaths |
@TravisEz13 This appears to have made the |
It just took 4 years to make a telemetry opt-out visible for the users -
almost available 🤣 😭
|
🎉 Handy links: |
PR Summary
Fixes #10578
Checkbox not ticked by default, i.e. telemetry is still on by default (via UI and silent install)
PR Context
To support community request in linked issue. Also a common enterprise scenario.
PR Checklist
.h
,.cpp
,.cs
,.ps1
and.psm1
files have the correct copyright headerWIP:
or[ WIP ]
to the beginning of the title (theWIP
bot will keep its status check atPending
while the prefix is present) and remove the prefix when the PR is ready.