ActiveX Control Name is not available - c#

ActiveX Info - This ActiveX Control is
Implemented using C#, VS 2008, .Net Framework 3.5
Digitally Signed with valid Code Signing Certificate
Installed using VS Deployment Project and Registered on Client Side
Problem - One of our web page loads this ActiveX Control, however for a first time visitor, the IE (I'm using IE9) prompts
This webpage wants to run the following add-on: 'Control name is not available' from 'Not Available'
After allowing it, then go into "Tool" => "Manage Add-ons", it's now there with proper Control Name & Publisher.
Seeking - I'm looking for solutions that will either
Display correct information in the warning prompt, Control name & Publisher name, OR
Remove the warning completely
Researched Solutions - I have found some suggested solutions, but none of them describe fully
Display correct name by COM Shim approach on MDSN
Performance issue
Although I did go ahead downloading COM Shin Wizard, but lack of info after creating it
Remove warning by setting up CLSID and domain as an approved domain in the registry during installation
Not sure which registry to create/update, need more specific registry values
How to Set ActiveX Control Name on StackOverflow
Bounty set by me, but maybe the question is too old which grabs no attention.
I'll start bounty on this question once the old one has expired.
All helps are appreciated

Got it solved by putting on to pre-approvaed list
To put your control on the
pre-approved list, you need to write
the CLSID of the control to the
following registry location.
HKEY_LOCAL_MACHINE
SOFTWARE
Microsoft
Windows
CurrentVersion
Ext
PreApproved

Related

C# application which installs and allows for global command line

I would like to build a simple .NET application that installs on a windows machine which will allow the end user to open a command prompt and type "google test" which will open google and search for test. But I'm not sure how to install a global "keyword" such as "google". Is this down via Environment variables? How does this link up to my .NET application?
Any advice or pointers is appreciated.
Thanks
This is beyond a .NET application and belongs into the Area of Setup programms. Visual Studio used to have a Installer Project, but as there are so many 3rd party ways this was removed.
Having "google test" parsed as a google search for "test" is tricky, but possible. However it depends entirely on how the commandline is parsed in a Windows. Wich is pretty much the way it was parsed since DOS 1.0.
If you just enter a word like "google", the commandline will look if there is a Excetuable file (.exe, .com, .bat) of that name in the current folder (working directory). It will then look into all the folders defined in the path variables. However using path variables is so dated, I could find only a single entry in my Windows Path variable now. And it is for MS backward compatibility: "%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;"
Most starting of programms is done via file associations with a specific type. And protocoll associations with a protocoll (like http, https, steam). Indeed my advise would be to make a .NET Programm named "google" whose sole purpose is to to format the proper URL, then send it to console parsing via ProcessStart. And let Windows solve wich programm to use from there.
Edit: And as I only realized after wirting this, apparently Windwos finally supports commandline aliases. https://learn.microsoft.com/en-us/windows/console/console-aliases
Apparently they even added a way to make them via the WinAPI in Windows 2000. However that requires moving to unmanaged code. And I have no experience, but it appears those aliases might only be valid for one console instance. So you might have to put it into a place like hte autoexec.bat to be called everytime a console is created.

Win32 Interop using PowerAPI - PowerIsSettingRangeDefined() is an undefined/missing function

I'm currently using C# and Win32 interop to register power setting notifications, enumerate power setting guids, etc. In the process of this, I came across a function in the MSDN documentation called "PowerIsSettingRangeDefined" that looked useful. When I imported the function and tried to test it, the compiler threw "System.EntryPointNotFound" exception. Obviously I double checked my spelling, etc, to no avail. So I looked for the header file on my computer and I did find the function listed in the 'powrprof.h' header for the 8.0 SDK, however, I don't have a copy of the 7.0 or 7.0A SDK on this computer. But according to the documentation, this was supposed to have been implemented starting with Windows 7. So this should have worked...
Then I used ProcessHacker to inspect the export table of the 'powrprof.dll' module in my process. The function was NOT there! To take it one step further, I used PE Explorer on the actual 'powrprof.dll' file located in "C:\Windows\SysWOW64\" and the entry point in question, again, was NOT in the name list. So the official header files include this function with "#if (NTDDI_VERSION >= NTDDI_WIN7)" above, and the documentation shows the function exists starting with Win7, however, it seems the MS team did not include it when compiling 'powrprof.dll' for Windows 7.
Maybe someone can check their copy in Windows 8.1/10 to see if this issue is only on Windows 7? I don't have another version of Windows in this building or I'd test it myself. And I wanted to bring it to attention here first, before trying to report this to Microsoft, just in case I'm missing something.

Outlook Addin Installation and Deployment(userwise and machinewise)

We have developed a Outlook Add In. I wish to deploy this add in in both Single User / Multi user environment
I have managed to deploy this Add In for single user environment. I am adding a Registry Entry (HKCU) for single user and the add in gets installed under "APPDATA\ROAMING\CompanyName\AddInName." I am using standard MSI for installation
But the issue I face is even if i ran the Installer, I don't see Add In appearing under Outlook, unless, I browse to the installation path (as above) and double click on VSTO file and deploy it again.
For Terminal Server / Citrix based implementation, I am trying to change the Registry to HKLM but not 100% sure how this will work.
My question is that
1. How I can have deploy this Outlook Add in only in one attempt. I don't want to install and then deploy (double click VSTO) file?
2. How I can deploy this add in for Terminal Server / Citrix based implementation?
I have gone through various blogs but they are not very clear and cause more confusion.
Would appreciate your expert suggestions
Thanks
Unfortunately I can only answer the first part of your question - You will have to create registry entries so that when Outlook is started it automatically applies your installed add in. See the link below for a detailed explanation of the registry keys that are required. https://msdn.microsoft.com/en-us/library/bb386106.aspx
In short, You need to add a registry entry for your add in that contains a FriendlyName, Description, LoadBehavior and Manifest input. Directing to the following link will tell you exactly how to do this and exactly where to put the keys. https://msdn.microsoft.com/en-us/library/cc442767.aspx#To-create-registry-keys
Best of luck and If you have any issues with that, comment below and I will help you as soon as I can.
**As an added note, I once had problems similar to the one you are having, and in my case it was due to the LoadBehavior setting. I was using the "UK Spelling" of the word instead of the US spelling. LoadBehavior must be specified exactly as I have written it here.

Check if Browser is Exist in Client Machine

I'm using C# as a programming platform.
Can anyone help me on how can I populate all existing browser in the client machine.
And I want also to validate first if the browser (firefox.exe) is existing in the client machine before calling the process of
System.Diagnostics.Process.Start("firefox.exe", "http://stackoverflow.com");
You'll need to inspect the Uninstall registry keys to determine if specific programs are available. Things to beware of:
Different versions of the same browser may populate different uninstall keys (not recommended but it happens)
I don't believe internet explorer has a registry key in all situations but if you're running on Windows you should be pretty safe here.
I faced same situation sometimes ago and the answer what I found after alot of R&D was: It's not possible.

COM Class factory error 80040154 when Opening Get Directory Dialog

I know the usual cause for this issue is related to the platform that a component is compiled to and I have had the problem in the past. However this is a report from a single user and occurs any time he tries to open either a dialog to select a file or directory. I am not using any fancy components here just the standard one. The relevant lines in one of the stack traces are:
Retrieving the COM class factory for component with CLSID
{DC1C5A9C-E88A-4DDE-A5A1-60F82A20AEF7} failed due to the following
error: 80040154. at
System.Windows.Forms.OpenFileDialog.CreateVistaDialog() at
System.Windows.Forms.FileDialog.RunDialogVista(IntPtr hWndOwner) at
System.Windows.Forms.FileDialog.RunDialog(IntPtr hWndOwner) at
System.Windows.Forms.CommonDialog.ShowDialog(IWin32Window owner) at
System.Windows.Forms.CommonDialog.ShowDialog() at
ScruffyDuck.AirportDesignEditor.MainForm.getOpenFileInfo(String
initialDirectory, String filter)
I searched my registry for this CLSID and came up with
%SystemRoot%\System32\comdlg32.dll
Which is no a surprise I suppose. I assume, since there are many other users out there who do not have this problem that is must relate to the users setup. I would appreciate any ideas on how to advise him in this case.
Many thanks
I'm just guessing now, since this is no programming question, so don't -1 me if I didn't help, just giving some ideas... :P
Problem here is that the system can't make COM object out of the COM class specified by that CLSID. This can happen for many reasons:
Library comdlg32.dll is not registered, try to register it with regsvr32 comdlg32.dll
System accont doesn't have full control (permission) over the registry key that holds CLSID {DC1C5A9C-E88A-4DDE-A5A1-60F82A20AEF7}. You can check that by navigating (or searching registry) to that key, right click on it, and by selecting Permissions... give SYSTEM account full control over it.
Try the above for the Administrator account as well.
Library comdlg32.dll is corrupted. This can happen if the spyware or some other malicious program tried to hook itself to the Open File or Browse Directory dialogs and so has modified the lib... in that case, you have to reinstall the lib... or windows. To check is the lib ok, make the MD5 hash of it, and compare with the MD5 hash of the lib on a working system. They should be identical.
Well, hope I helped. :)

Categories