How to find world region (or country) or language from the windows registry? - regioninfo

I'm working with a very old installer that can read Registry entries but has a difficulty (complex) time executing Windows APIs.
I'm trying to detect whether the PC it's being installed on is in Australia.
Any ideas?

This key:
HKEY_USERS.DEFAULT\Keyboard Layout\Preload
sets the default language for the login screen
The different country codes are listed here:
http://www.windowsitpro.com/Article/ArticleID/14867/14867.html

From my testing and the MSDN page below, this will work:
HKEY_CURRENT_USER\Control Panel\International\sCountry
="Australia"
This corresponds to setting in the Region Options ("Select an item to match it' preferences".
http://support.microsoft.com/kb/102978
This has the advantage of also being able to be read from a non-admin account.

To supplement: "HKEY_CURRENT_USER\Control Panel\International\sCountry" is only used for the notation format. You could also use. "HKEY_CURRENT_USER\Control Panel\International\Locale" and link it to a table.
The notation cross-table:
https://msdn.microsoft.com/en-us/library/ee825488(v=cs.20).aspx
https://www.science.co.il/language/Locale-codes.php
The current location is stored in "HKEY_CURRENT_USER\Control Panel\International\Geo\Nation"
The location cross-table:
https://msdn.microsoft.com/en-us/library/windows/desktop/dd374073%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396

Related

SAP MDG see Change Documents of a given Business Partner?

I would like to know if there's a way or some query to see the Change Documents out of a given Business Partner using SAP or SAP Webdynpro GUI. I've googled but tables such as CDHDR or CDPOS are not working for me. Any other thoughts?
You should check and enable (if they were disabled) the change document object BUPA_BUP in SCDO transaction, with the following values
Check this mini-guide: http://abapcadabra.com/index.php/cookies/541-change-documents

Is it safe to use a UUID as the name for a Node Webkit package?

According to the Node-Webkit wiki the manifest for a program requires a name and this name must be globally unique because it determines the name of the directory that data files for the program are stored in.
I haven't been able to find anything else that this name is used for. Is it safe to just use a UUID as the name listed in the manifest? Or will that be exposed to the user somewhere potentially?
It's more typically related to the common program name that the user sees, but it doesn't have to be. For example on the Mac, the standard location for app specific data is ~/Library/Application Support/. When I look there I see things like GIMP, Skype, XDK &c. If your app happened to have the same name as another app, it would cause problems as they'd both writing to the same location, i.e. if I gave my app the name GIMP, both apps would try to write files to that dir.
Typically a user doesn't have to access this directly, so there's probably no harm in using a UUID here, though I would probably append it to a name related to my app name, just for clarity/simplicity, i.e. instead of making the name foo I'd make it foo-<UUID>.
But I'm no expert . . . .

How to get the current version number of a Trigger.io app

Is there a way to get the app config settings from inside my Trigger.io app without having to repeat the values in the parameters module? Specifically, I'm looking to grab the version number.
I've had success (today) with using forge.config.version
Example:
alert(forge.config.version)
This returned the value I had entered into the app's configuration.
It used to be available under forge.config in Javascript, but isn't anymore. For a while it wasn't available under this key (around v. 1.2). It has since reappeared.

How to get all configuration settings from Azure Config file?

I need to get all configuration settings (current role or all roles not matter) from Azure cscfg file. I want to do this because i dont want to get all values one by one via RoleEnvironment.GetConfigurationSettingValue(key) method.
Is there any way to do this?
Regards
The short answer is 'no' the RoleEnvironment does not support getting all the configuration setting values.
A slightly longer answer is that getting configuration settings from the role environment in the current implementation is done through a call to native code. The separation of Windows Azure Application from Windows Azure Configuration and the ability to swap settings on a running application is at the root of this somehow. This is done inside of msshrtmi.dll (which should mean something like Microsoft Shared Runtime Managed Interop). This is the only reference Microsoft.WindowsAzure.ServiceRuntime.dll has apart from standard references to .NET.
Here is the method call to native code (I have not gone further than this):
[MethodImpl(MethodImplOptions.Unmanaged, MethodCodeType=MethodCodeType.Native), SuppressUnmanagedCodeSecurity, DllImport("", EntryPoint="", CallingConvention=CallingConvention.StdCall, SetLastError=true)]
internal static extern unsafe int modopt(IsLong) modopt(CallConvStdcall) RdGetApplicationConfigurationSetting(ushort modopt(IsConst), ushort*);
It might seem like a slightly round-about way of doing it, but if you want to get the configurations for all the roles in a deployment you can use the management api.
Kudu has an API for this.
You get to Kudu like via App Services > Advanced Details > Go
https://{app-service-name}.scm.azurewebsites.net/
or
https://{app-service-name}-{slot-name}.scm.azurewebsites.net/
The Url for the settings API is:
https://{app-service-name}.azurewebsites.net/api/settings or https://{app-service-name}-{slot-name}.scm.azurewebsites.net/

Sourcegear Vault: How do I get an automated list of checked out files?

Question:
How can I get a list of all checked out files per user in Sourcegear Vault?
Use of this functionality:
From time to time we have developers leaving files checked out and although this results in drastic punishment (they owe a coffee to the person who needed the checked out file) we are still left with files checked out and work held up.
We would like to display a list of all current number of files checked out by each developer. This way they can check if they have anything checked out before they go home or out the office.
In the Vault Client app, use the Search tab at the bottom of the window.
Select Search By: "Checked Out By" to see a list of all files checked out by a specific user, or by any user.
You can choose to search a specific sub-folder, or from the root, recursively or not.
To automate this, use the Vault Command-Line client (vault.exe)
vault -host myhost.mydomain -user something -password something -repository myrepo listcheckouts
Will give you a list, in XML, of all checked-out files and their users. You can transform the results, or use the command-line client's source code (provided as an example with the Vault .NET API) as a starting point to write your own version.
The various clients and APIs can be grabbed from http://sourcegear.com/vault/downloads.html - didn't want to link to a specific version that would be outdated after the next release.