comobject

Windows10 script pin app to start menu

余生长醉 提交于 2019-12-06 06:33:29
I have a Universal App that I'm sideloading in Windows10. I would like to create a script (Powershell, VBS, batch, etc) to pin it to the Start Menu. I have found many examples of how to write a script that pins a desktop application (like this one: https://gallery.technet.microsoft.com/scriptcenter/Script-to-pin-items-to-51be533c ). I've tried using the script to pin the actual App .exe file located in C:\Program Files\WindowsApps... but that doesn't work. When I try and pin that way, I run DoIt(), which doesn't return anything. There are no error messages, but the tile is not pinned to the

Error using ListObject.Add to create a Table Style

﹥>﹥吖頭↗ 提交于 2019-12-05 15:16:13
I'm Trying to create a Custom Table(Just like click the 'Format as Table' in the excel bar) with PowerShell and Excel ComObject from a CSV Here's my code... $Excel = New-Object -ComObject excel.application $Excel.visible = $true $Excel.sheetsInNewWorkbook = $csvFiles.Count $workbooks = $excel.Workbooks.Add() $worksheets = $workbooks.worksheets $CSVFullPath = C:\temp.csv $worksheet = $worksheets.Item(1) $worksheet.Name = "Temp" $TxtConnector = ("TEXT;" + $CSVFullPath) $CellRef = $worksheet.Range("A1") $Connector = $worksheet.QueryTables.add($TxtConnector,$CellRef) $worksheet.QueryTables.item(

How to pass a variant object type 16396 in a COM method that requires an input value of a VT_VARIANT [12]

房东的猫 提交于 2019-12-04 21:48:45
I have in my PHP code, a COM object '$com_myObject' with a method 'myObjectMethod' which after I run com_print_type info($com_myObject); on it, it shows that it has the method 'myObjectMethod' declared as shown below myObjectMethod(/* VT_VARIANT [12] [in] */ $RawData) { /* Processes entered object data */ } In my code I am having another function return a variant object '$myInputObject' of type value 16396. I plan to use '$myInputObject' as the input value for 'myObjectMethod' method. print variant_get_type($myInputObject); //returns 16396 I am retrieving the value for '$myInputObject' as

How to get a System.__ComObject value from Active Directory in C#

孤街醉人 提交于 2019-12-02 01:36:19
问题 After a long period of search I decide to ask my own question about my problem. I try to get the value of a Property in Active Directory, but I always get a System.__ComObject . correspondance += compte.Properties["ENTPersonDateNaissance"][0]; I have tried to use : Microsoft.VisualBasic.Information.TypeName(compte.Properties["ENTPersonDateNaissance"] The result is PropertyValueCollection But I don't know how to get the value? 回答1: In fact, the variable "compte" is of type DirectoryEntry, I

How to get a System.__ComObject value from Active Directory in C#

主宰稳场 提交于 2019-12-01 23:03:18
After a long period of search I decide to ask my own question about my problem. I try to get the value of a Property in Active Directory, but I always get a System.__ComObject . correspondance += compte.Properties["ENTPersonDateNaissance"][0]; I have tried to use : Microsoft.VisualBasic.Information.TypeName(compte.Properties["ENTPersonDateNaissance"] The result is PropertyValueCollection But I don't know how to get the value? In fact, the variable "compte" is of type DirectoryEntry, I switched it to SearchResult, and now I can access it value with : compte.Properties["ENTPersonDateNaissance"]

Dump Object for ComObject using dynamic?

旧巷老猫 提交于 2019-12-01 11:12:35
I'm trying (without luck) to implement an "Object Dumper" for objects I'm accessing in the Office Type Library. It must be possibly, because VS's debug window has a "dynamic view" for the System.__ComObject objects that effectively does what I want. Any ideas? I have also created a method for getting an interface that can be used for accessing the object. Use: using System.Runtime.InteropServices; using System.Runtime.InteropServices.ComTypes; You have to have an IDispatch interface in your code: [Guid("00020400-0000-0000-C000-000000000046"), ComImport(), InterfaceType(ComInterfaceType

How do you read from a multidimensional variant array returned from a COM object in PHP?

人盡茶涼 提交于 2019-12-01 09:27:02
I'm working with a COM object that returns a multidimensional VARIANT array (vt_array), and I'm trying to read values from the array. When I use print_r($mdArray) it displays variant Object . ( variant_get_type($mdArray) returns 8204 .) I tried using foreach ($mdArray as $oneArray) but I get the message: Warning: Loader::getfields() [loader.getfields]: Can only handle single dimension variant arrays (this array has 2) in C:\Inetpub\wwwroot\root\script\fileloader.php on line 135 Fatal error: Uncaught exception 'Exception' with message 'Object of type variant did not create an Iterator' in C:

How do you read from a multidimensional variant array returned from a COM object in PHP?

和自甴很熟 提交于 2019-12-01 07:06:28
问题 I'm working with a COM object that returns a multidimensional VARIANT array (vt_array), and I'm trying to read values from the array. When I use print_r($mdArray) it displays variant Object . ( variant_get_type($mdArray) returns 8204 .) I tried using foreach ($mdArray as $oneArray) but I get the message: Warning: Loader::getfields() [loader.getfields]: Can only handle single dimension variant arrays (this array has 2) in C:\Inetpub\wwwroot\root\script\fileloader.php on line 135 Fatal error:

How to get actual JavaScript value in onclick from webbrowser control?

≡放荡痞女 提交于 2019-11-30 05:01:53
I'm looking for a way to get the JavaScript code defined inside of onclick. I'm using .NET 2.0 C# Visual Studio 2005. Example: <span id="foo" onclick+"window.location.href='someURL'>click here</span> My goal is to get the string "window.location.href='someURL'" . Scenario: A user clicks on web page element, the tag shown above for instance, inside of WebBrowser control. Then the clicked tag is refereed to H tmlElement object . In WebBrowser control I then call HtmlElement object's getAttribute("onclick") , it just gives me " System.__ComObject". I've searched how to deal with it then found

How to convert 8209 array object variant to VT_VARIANT

风格不统一 提交于 2019-11-29 13:04:01
I am calling a COM object method that returns an array variant object of type 8209 in my PHP code. $com_VArray = $com_Object->objectMethod; //Is a 8209 variant object I want in the end to pass the converted VT_VARIANT object as a value for another COM object method which requires its input to be VT_VARIANT[12]. I am converting $com_VArray to a VT_VARIANT object variant type by issuing the following $obj_VT_VARIANT = variant_cast($com_VArray, VT_VARIANT); But then I get this following error Fatal error: Uncaught exception 'com_exception' with message 'Variant type conversion failed: Type