How to find GP Name from GP English Name in ADMX file - google-chrome

hi i am currently moving gpo's to intune. i have read all of microsoft's documentation but one thing they do not cover is how to derive the gp name (in admx file) from the gp english name (what you would see in gp edit console). For non custom ADMX they say you can use the csp console like the image below:
but i am wanting to move over gpos that use custom admx, such as google chrome. I can go into the gp edit console and see the "Action on startup" gpo for example in the following location: Google/Google Chrome - Default Settings (users can override)/Startup, Home page and New Tab page
but how do i associate that with a policy entry in the chrome.admx file? just by going through the file i see this entry that most closely resembles what I want to do but how can i be sure it is the right one?
<policy class="Both" displayName="$(string.RestoreOnStartup)" explainText="$(string.RestoreOnStartup_Explain)" key="Software\Policies\Google\Chrome" name="RestoreOnStartup" presentation="$(presentation.RestoreOnStartup)">
<parentCategory ref="Startup"/>
<supportedOn ref="SUPPORTED_WIN7"/>
<elements>
<enum id="RestoreOnStartup" valueName="RestoreOnStartup">
<item displayName="$(string.RestoreOnStartup_RestoreOnStartupIsNewTabPage)">
<value>
<decimal value="5"/>
</value>
</item>
<item displayName="$(string.RestoreOnStartup_RestoreOnStartupIsLastSession)">
<value>
<decimal value="1"/>
</value>
</item>
<item displayName="$(string.RestoreOnStartup_RestoreOnStartupIsURLs)">
<value>
<decimal value="4"/>
</value>
</item>
</enum>
</elements>
</policy>

If you download the chrome policy templates zip, go to windows\admx\en-us folder. There’s a chrome.adml that will contain all the string substitutions for the admx. Admx + locale adml = what you see in the Gp editor window.

Related

Can't use EWS UpdateItem operation from Outlook add-in

I'm am trying to update a dictionary element in the IPM.Configuration.OWA.UserOptions message using an UpdateItem via an EWS (SOAP) request from an Outlook web add-in with ReadWriteMailbox permissions. However it is failing with the following error in the response:
ErrorAccessDenied: Office extension is not allowed to update this type of item.
The UpdateItem request I'm using is a fairly straightforward example of updating a message by it's ID and setting the value of an extended property:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<soap:Header>
<RequestServerVersion Version="Exchange2013" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" soap:mustUnderstand="0" />
</soap:Header>
<soap:Body>
<m:UpdateItem MessageDisposition="SaveOnly" ConflictResolution="AlwaysOverwrite">
<m:ItemChanges>
<t:ItemChange>
<t:ItemId Id="AAMkAGM0YTZmNjhiLTI0OWYtNGFlNC05ODAzLTNlZWQyODhmOTY2MABGAAAAAACxU7lpjO+oS5hB0UfA6muFBwDcAGmTk49MRrSCdR7rvVFPAAAAAAEBAADcAGmTk49MRrSCdR7rvVFPAAD2pXuVAAA=" ChangeKey="CQAAABYAAADcAGmTk49MRrSCdR7rvVFPAAD2uhNb" />
<t:Updates>
<t:SetItemField>
<t:ExtendedFieldURI PropertyTag="0x7c07" PropertyType="Binary" />
<t:Message>
<t:ExtendedProperty>
<t:ExtendedFieldURI PropertyTag="0x7c07" PropertyType="Binary" />
<t:Value>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxVc2VyQ29uZmlndXJhdGlvbj4NCgk8SW5mbyB2ZXJzaW9uPSJFeGNoYW5nZS4xMiIgLz4NCgk8RGF0YT4NCgkJPGUgaz0iMTgtSXNGb2N1c2VkSW5ib3hPbkxhc3RVcGRhdGVUaW1lIiB2PSIxOC0wMS8wMS8wMDAxIDAwOjAwOjAwIiAvPg0KCQk8ZSBrPSIxOC1hdXRvYWRkc2lnbmF0dXJlIiB2PSIzLVRydWUiIC8+DQoJCTxlIGs9IjE4LVVzZXJPcHRpb25zTWlncmF0aW9uU3RhdGUiIHY9IjktNSIgLz4NCgkJPGUgaz0iMTgtdGhlbWVTdG9yYWdlSWQiIHY9IjE4LSIgLz4NCgkJPGUgaz0iMTgtYXV0b2FkZHNpZ25hdHVyZW9ucmVwbHkiIHY9IjMtVHJ1ZSIgLz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yYjeEQ7JiN4QTsmbHQ7L2hlYWQmZ3Q7JiN4RDsmI3hBOyZsdDtib2R5Jmd0OyYjeEQ7JiN4QTsmbHQ7cCZndDsmYW1wO25ic3A7Jmx0Oy9wJmd0OyYjeEQ7JiN4QTsmbHQ7cCZndDstLSZsdDsvcCZndDsmI3hEOyYjeEE7Jmx0O3AmZ3Q7SXp6eiBhbSBKYW5pY2smbHQ7L3AmZ3Q7JiN4RDsmI3hBOyZsdDtwJmd0OyZhbXA7bmJzcDsmbHQ7L3AmZ3Q7JiN4RDsmI3hBOyZsdDsvYm9keSZndDsmI3hEOyYjeEE7Jmx0Oy9odG1sJmd0OyYjeEQ7JiN4QTsiIC8+DQoJPC9EYXRhPg0KPC9Vc2VyQ29uZmlndXJhdGlvbj4=</t:Value>
</t:ExtendedProperty>
</t:Message>
</t:SetItemField>
</t:Updates>
</t:ItemChange>
</m:ItemChanges>
</m:UpdateItem>
</soap:Body>
</soap:Envelope>
The 0x7c07 property I'm updating in the UserOptions message contains a base64 encoded value of various signature related dictionary properties that I've modified:
<?xml version="1.0" encoding="utf-8"?>
<UserConfiguration>
<Info version="Exchange.12" />
<Data>
<e k="18-IsFocusedInboxOnLastUpdateTime" v="18-01/01/0001 00:00:00" />
<e k="18-autoaddsignature" v="3-True" />
<e k="18-UserOptionsMigrationState" v="9-5" />
<e k="18-themeStorageId" v="18-" />
<e k="18-autoaddsignatureonreply" v="3-True" />
<e k="18-timezone" v="18-Central Standard Time" />
<e k="18-signaturetext" v="18-
--
Izzz am Janick
" />
<e k="18-FavoriteFolders" v="1-18-3-120-AAMkAGM0YTZmNjhiLTI0OWYtNGFlNC05ODAzLTNlZWQyODhmOTY2MAAuAAAAAACxU7lpjO+oS5hB0UfA6muFAQDcAGmTk49MRrSCdR7rvVFPAAAAAAEMAAA=-120-AAMkAGM0YTZmNjhiLTI0OWYtNGFlNC05ODAzLTNlZWQyODhmOTY2MAAuAAAAAACxU7lpjO+oS5hB0UfA6muFAQDcAGmTk49MRrSCdR7rvVFPAAAAAAEJAAA=-120-AAMkAGM0YTZmNjhiLTI0OWYtNGFlNC05ODAzLTNlZWQyODhmOTY2MAAuAAAAAACxU7lpjO+oS5hB0UfA6muFAQDcAGmTk49MRrSCdR7rvVFPAAAAAAEPAAA=" />
<e k="18-IsOptimizedForAccessibility" v="3-False" />
<e k="18-IsFocusedInboxEnabled" v="3-True" />
<e k="18-NewEnabledPonts" v="9-2147401727" />
<e k="18-signaturehtml" v="18-<html><head></head><body><p>&nbsp;</p><p>--</p><p>John Doe</p><p>&nbsp;</p></body></html>;" />
</Data>
</UserConfiguration>
I can't find any documentation that states what is allowed or not allowed with UpdateItem operations (the list should be here). Updating the Outlook Online signature is also not currently possible with Graph or the Mail API. If what I'm trying to do ultimately cannot work then I just wasted 40+ hours of effort and will lose a client. :-|
Does anybody have any clever workarounds or know of a way to enable this operation? Note that using the EWS Managed API in server-side code is not currently an option for this solution.
Outlook does not allow add-ins to create or update FAI messages by design. In general we don't allow modifications of OWA options (or any other “service-type”, internal, item/data) directly which is probably an internal data structure, subject to change and potentially break the add-in.
If your scenario specifically requires access to outlook's signature system, I would recommend making a request to UserVoice

ServiceNow storing and calling upon glide scripts

I am creating a front end portal in ServiceNow that requires using g:evaluate to call on variables from different tables.
For example:
<g:evaluate var="jvar_user_name">
var gr = new GlideRecord('sys_user');
gr.get('sys_id', gs.getUserID());
gr.first_name;
</g:evaluate>
Is there a way to store a bunch of these somewhere and then call upon them as needed, much like UI Scripts for JS and Style Sheets for CSS? If so, how would I go about doing this?
Thanks!
Yes you should be able to do this by using UI Macros.
You could create a UI Macro called set_user_name_var like below:
<?xml version="1.0" encoding="utf-8"?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:evaluate var="jvar_user_name">
var gr = new GlideRecord('sys_user');
gr.get('sys_id', gs.getUserID());
gr.first_name;
</g:evaluate>
</j:jelly>
And then invoke the UI Macro any place where you can write jelly code, like so:
<g:set_user_name_var />
or alternatively:
<g:macro_invoke macro="set_user_name_var" />
And from that point on, the jvar_user_name jelly variable will exist and be able to be accessed.
For example:
<?xml version="1.0" encoding="utf-8"?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:set_user_name_var />
${jvar_user_name}
</j:jelly>

Get class by full package name in AS3

I have an xml with the following node:
<states package="my.package.states" start="preloader">
<item name="preloader" class="Preloader"/>
<item name="intro" class="Intro"/>
<item name="menu" class="Menu"/>
<item name="level_picker" class="LevelPicker"/>
<item name="credits" class="Credits"/></states>
And now I need to get a class reference to the class with the package attributes on states node plus the class attribute for each item... This is what I tried (among other stuff):
var c:Class = getDefinitionByName('my.package.states.Preloader') as Class;
And no success... Is there a way to get the result I want?
If you want to use getDefinitionByName, the Class needs to be imported.
What you are trying to do there, will not work. MXML is just a markup language, which is "converted" to AS3 by the compiler. What you are trying to do, is like getting into a car and once you have started the engine, you expect the car to change into a motor-cycle, a plane and a refrigerator. This might work in "Transformers", but not in a program.
What you COULD do: inside of our "item"-component, you could create instances of those classes/components and add them to "item".

How do I get autocompletion for Flex Metadata?

I took a look at flex metadata and it seems to be quiet straight forward. Though I have a problem, I don't get autocompletion for the metadata.
I'll tell you what I did, maybe you find an error. I want to create my own Style metadata tag named e.g. MyStyle. I want to create my own because it's easier for me to determine at runtime if the metadata was added by me or by the flex framework (therefore I will not use the predefined Style metadata tag).
To add metadata is pretty simple, I just wrote this code to get it work:
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
width="1024" height="768">
<fx:Metadata>
[MyStyle(required="true")]
</fx:Metadata>
</s:Group>
On my WindowedApplication component I added an added to stage listener to the stage. So all elements that are added to the application will fire that Event.ADDED when they are added to the stage. In that eventHandler I scan added elements for my metadata tag.
protected function addedToStageListener(event:Event):void
{
var classInfo:XML = describeType(event.target);
for each (var x:XML in classInfo..metadata)
{
if (x.#name == "MyStyle")
trace(x);
}
}
I also added a flex-config.xml file (in the toplevel of my src folder) to add the compiler options, so that I can read my custom metadata tag on runtime. The file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<flex-config>
<compiler>
<keep-as3-metadata>
<name>MyStyle</name>
</keep-as3-metadata>
</compiler>
</flex-config>
When I run this, I get the result I expect
<metadata name="MyStyle">
<arg key="required" value="true"/>
</metadata>
So this works. My next step was to add autocompletion when adding the metadata tag to the code. To do this you should create a metadata.xml which specifies the metadata tags right?
So I did this and I ended up with this simple metadata.xml
<?xml version="1.0" encoding="UTF-8"?>
<annotations version="2.1.1">
<metadata name="MyStyle" description="Adds style.">
<context name="class" />
<attribute name="required" type="Boolean" required="true" />
</metadata>
</annotations>
To add the metadata.xml correctly to the project I followed that tutorial by Adobe, but it doesn't work. I don't get autocompletion. Do you have any suggestions?
Update: I use Flash Builder 4.6 Professional and I created a Flex Library Project.

"text-overflow: ellipsis;" in XUL applications

I'm writing an extension to an existing XUL-application, conkeror. In that, In
some part of the user-interface of I'm writing, I'm creating HTML elements with
a fixed-width, <span>s in this case, to display various results.
Within those spans there's text some text, which, on occasion, is too long to
fit its fixed-with container. I'd like to cut-off the parts that are too long,
and end it with an ellipsis instead.
Those spans currently have the following CSS attributes:
display: inline-block;
width: 30%;
overflow: hidden;
white-space: nowrap;
In addition to that, I'd like to use text-overflow: ellipsis;, but it turns
out the Gecko platform doesn't implement that yet. However, for plain HTML pages
with regular style-sheets, there happens to be a workaround for Firefox and
other Gecko-based products, that makes cutting off overlong text and putting an
ellipsis at its end work anyway.
The details of that technique are described
here. It's
using Gecko's ability to run XUL code to do its magic.
So I've tried to use that in my XUL application as well. I've changed my
style-sheet to include the described
-moz-binding: url('ellipsis.xml#ellipsis');, and also created the
elipsis.xml file as described.
However, doing this (or similar things using different URLs, e.g. chrome:// or
absolute file:// URLs) seems to have no effect whatsoever within my
application. In fact, it doesn't even try to access the ellipsis.xml file at
all, according to strace.
Obviously XUL is able to do what I want, so I'm assuming I'm doing something
wrong, or am simply missing out on some detail I have to take care of first in
order to get the desired results.
What I'm looking for is a way to pull the regular text-overflow: ellipsis;
track within a XUL application or, alternatively, a way to get the same result
without the aforementioned technique.
For some (maybe security) reason you need to use a chrome:// url in your CSS file. I tested it with conkeror 0.9.2 and xulrunner 1.9.1.
-moz-binding: url("chrome://conkeror/content/ellipsis.xml#ellipsis");
Where your ellipsis.xml is in /conkeror/install/path/modules/ (on debian /usr/share/conkeror/modules). You can check the chrome.manifest file to find the right location for your XML file, probably the style folder.
You said it´s not having ANY effect?
With
display:block; text-overflow:clip; overflow:hidden; white-space:nowrap;
it should at least cut off the text without the "...".
Is the reference to your xml file correct and your css and xml files are at the same path?
Also, try using this code:
<?xml version="1.0"?>
<bindings
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
>
<binding id="none">
<content><children/></content>
</binding>
<binding id="ellipsis">
<content>
<xul:label crop="end"><children/></xul:label>
</content>
<implementation>
<field name="label"> document.getAnonymousNodes( this )[ 0 ] </field>
<field name="style"> this.label.style </field>
<property name="display">
<getter>
this.style.display
</getter>
<setter>
if( this.style.display != val ) this.style.display= val
</setter>
</property>
<property name="value">
<getter>
this.label.value
</getter>
<setter>
if( this.label.value != val ) this.label.value= val
</setter>
</property>
<method name="update">
<body>
var strings= this.textContent.split( /\s+/g )
if( !strings[ 0 ] ) strings.shift()
if( !strings[ strings.length - 1 ] ) strings.pop()
this.value= strings.join( ' ' )
this.display= strings.length ? '' : 'none'
</body>
</method>
<constructor> this.update() </constructor>
</implementation>
<handlers>
<handler event="DOMSubtreeModified"> this.update() </handler>
</handlers>
</binding>
</bindings>