Programmatically turn on "sending analytics information"
Moderators: Víctor Paredes, Belgarath, slowtiger
Programmatically turn on "sending analytics information"
Is there some way to programmatically adjust the Moho setting "Allow sending analtyics information to Smith Micro"?
We want to be able to have a script run to fix up someone's user settings so that they're set to consistent values across the board. Most of them I can find by opening the user.settings file, and I just changed them to values I wanted and compared the new and old versions of the file in Notepad++ for differences in value.
However the analytics setting doesn't seem to appear in there, at least not in any clearly enabled way. We're looking to ensure that everyone has the setting turned on, but can't find where to do that. Does anyone know where this value is or might be stored? Alternatively, a commandline argument to moho or an in program function to turn it on would do the job.
We want to be able to have a script run to fix up someone's user settings so that they're set to consistent values across the board. Most of them I can find by opening the user.settings file, and I just changed them to values I wanted and compared the new and old versions of the file in Notepad++ for differences in value.
However the analytics setting doesn't seem to appear in there, at least not in any clearly enabled way. We're looking to ensure that everyone has the setting turned on, but can't find where to do that. Does anyone know where this value is or might be stored? Alternatively, a commandline argument to moho or an in program function to turn it on would do the job.
- synthsin75
- Posts: 10253
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: Programmatically turn on "sending analytics information"
Yeah, I thought that would be in the user.settings file too. Took a bit of hunting, but I found where that setting is stored on Windows (hidden folder):
C:\ProgramData\Smith Micro\Moho\12\Moho12.lic.prefs
The value you want to change is:
"pa_CanSendAnalytics" "FALSE"
C:\ProgramData\Smith Micro\Moho\12\Moho12.lic.prefs
The value you want to change is:
"pa_CanSendAnalytics" "FALSE"
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Re: Programmatically turn on "sending analytics information"
Aha, that was exactly it yes. I wonder if it's segregated away to try keep name and email safe? Either way, this will let me set it, thanks very much!
- synthsin75
- Posts: 10253
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: Programmatically turn on "sending analytics information"
Looks like all stuff that's probably set while activating/registering the software. Since the developers know many of us like to mess with the user.settings file (including deleting the whole folder sometimes), they probably thought it safer to hide this stuff elsewhere.
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Re: Programmatically turn on "sending analytics information"
Just back with a similar problem I had thought I'd cracked.
I was also trying to set up a folder to appear in library assets, but not having any luck. I did find a SourceRoots.json file in the AppData folder, stored alongside the user.settings file. It contains JSON data that has a few fields for references, so I tried to insert a reference to a folder with data like this:
But that doesn't seem to actually include the folder in the library. As far as I can see, this does seem to match the format of folders being imported through the Moho UI. So there must be some other file somewhere that also needs to be amended?
I was also trying to set up a folder to appear in library assets, but not having any luck. I did find a SourceRoots.json file in the AppData folder, stored alongside the user.settings file. It contains JSON data that has a few fields for references, so I tried to insert a reference to a folder with data like this:
Code: Select all
LIBRARY = {"path": "C:/Path/to/Library",
"relativeTo": "Custom",
"name": "_My_Library"}
- synthsin75
- Posts: 10253
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: Programmatically turn on "sending analytics information"
Is it an existing folder? Did you restart Moho after the change?
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Re: Programmatically turn on "sending analytics information"
Yeah it's a real folder. I even just did a manual import of the folder on one computer to make sure that I was matching the format the file is normally written in. I have Moho closed while the script runs, editing the appdata files. So it's been closed and reopened multiple times with no change. The folder information is in the SourceRoots.json file when I open it in Notepad, but it doesn't seem to have any effect on what folders are in the library.
It's a network share folder, but I don't see why that should change anything since the path still matches what it looks like after a manual import inside of Moho.
It's a network share folder, but I don't see why that should change anything since the path still matches what it looks like after a manual import inside of Moho.
- synthsin75
- Posts: 10253
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: Programmatically turn on "sending analytics information"
What about your "*Custom Content Folder*\Library\_LibraryData\_Locations" or Shared Resources folder?
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Re: Programmatically turn on "sending analytics information"
Ahhh, I hadn't seen the shortcuts stored in that folder. Once I copied in the necessary shortcut it worked with the edit I made to the file.
Thanks again for the help!
Thanks again for the help!
- synthsin75
- Posts: 10253
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: Programmatically turn on "sending analytics information"
Glad that worked. It was just a guess.
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/