ActiveX Control always working on my machine - unpredictable behavior on others? - activex

I have a question about my ActiveX control not always working in IE on other machines.
Context: I'm working on an internal app for my company. It is designed to be a standalone web-page config tool for viewing a static customized version of our web app. The user may select the colors, images, and other settings they would like to see, and these will be present in the static mockup/preview version on their machine when they click a button.
Implementation: my javascript file creates a filesystem/activex object that essentially creates a temporary javascript file to which a list of values are written. Then when the user previews the configuration, the javascript file is located and values are loaded dynamically into the dom, etc etc. Naturally this functionality only works in Internet Explorer and is shady at best, but is my only way of implementing a purely zero configuration, client-side dynamic webapp.
Problem: When I test out my script, Internet Explorer prompts me twice about ActiveX controls and I say "yes" to them and the ActiveX functions work. I do this every single time I open my page. But sometimes when I send the file to another person so they can use it, they don't get the notifications so it doesn't work. However sometimes they do get notifications and it does work! I am using default security settings for IE so there should be no difference between my settings and theirs.
Could this be related to my user permissions vs theirs, or the fact that the files are read-only (because they are coming from source control and are also being made read-only when put on the shared drive.) or unknown dark Microsoft forces beyond human comprehension?
Thanks,
Josh

I believe you may want to create an HTA (HTML Application) instead of a web page. Writing HTA's gives you more privileges as far as ActiveX objects are concerned. Check out this page from Microsoft: http://msdn.microsoft.com/en-us/library/ms536496(v=vs.85).aspx.
To answer your question about privileges, I believe that some of your coworkers' IE settings probably prevent web pages from using ActiveX objects. Your settings may be such that you are prompted whenever ActiveX object are about to be created.

Related

Find features of a non Microsoft program

I'm not sure how to even ask this question, but let's say I have a program such as Google Chrome. How would I find out the "features" of it so I can use PowerShell to modify it.
For example, how would I have Chrome open a web page and click a button.
I know for IE, you can use $ie.document.getElementById("loginform").submit() to click a button.
Thank you,
Tony
You can't ever really get the same amount of control over non-Windows programs using Powershell.
In terms of Chrome, you could simply open the browser and go to a webpage with:
$Start-Process "chrome.exe" "www.google.com"
There is generally not that much more for further functionality, but with Chrome you may be able to do things like change settings and configuration. Check out the (large) JSON file Preferences and other config files, which you can find in Chrome's local appdata folder (Win+R, %localappdata%, Google/Chrome/User Data/Default). I'm not too sure but it may also be a bad idea to mess around with these files.
I also did a Google search and found this third party powershell tool for browsers, called Selenium. Here's the list of extensions.

Intraweb - web application - users sessions

Today I started to write my first web application and I can't pass one step.
Everything works almost fine... I can connect to the server and open website. Problem is when I open browser and type the same address on the second pc, then I get te same data as on the first one.
Detailed...
Application has two forms, first is for login, and second one is for receiving data.
When I login on the first pc and second form shows up, and then I open browser and put the address of the server on the second pc, I see the second form after login from first pc.
What I should do in this case? I tried to find the solution in the net, but I couldn't :(
If you are using any Delphi IDE after XE3 (including) and using the IntraWeb edition that comes with Delphi you must upgrade in order to have it working correctly. It is free, and more information can be obtained here:
http://atozed.com/IntraWeb/Download/FreeKeyRequest.EN.aspx|
After upgrading (if this is your case) I suggest you to take a look at one of the IntraWeb demos, here:
https://iwdemos.codeplex.com/SourceControl/latest
There is a demo named Features that shows you exactly how to create a multi form application. To be honest, I work with IntraWeb for a long time and I've never seen that. Unless you are using some global var to hold your "current" active form. Have in mind that IntraWeb is a fully multithreaded application and global vars should not be used, unless you have some mechanism protecting concurrent access (but you should get rid of them and use ServerController properties instead).
Thnks for your quick reply.
I work with Delphi from some time, but I never used Intraweb, I worked with ComPort and IP works for I/O devices. I have XE7 and I upgraded Intraweb to 14.0.52.
I can't find a good file exchange server to put my application for sharing with you. If I find somethin I will post it below.
You can check the code and other settings of my simply project. I put the web application inside the link below, it is without the .exe file.
https://www.dropbox.com/s/75zurcew0zr363x/Project1.rar?dl=0
Thanks for your help.

How Do I Load Assemblies Only From Trusted Source using Ninject?

I have an ILog interface that has multiple implementations. One will be writing to a database, one on Windows Event Log, another on an xml file, some on text files for different vendors.
Implementations of this interface are dynamically loaded using Ninject. With the growing number and the recent news on hacks and malwares sleeping on some networks, I would like to know if there is a way to filter the assemblies to only the trusted ones?
We are trying to prevent someone from just creating their own implementation of our interfaces and dropping the dll into the bin folder then they get access to the flow of our information.
Please note that we load assemblies that follows the ILog interface.
It is rather useless to try preventing this. If piece of malware can already write to the application folder, all your attempts to 'filter out' illegal dlls will always fail. The attacker can for instance simply replace the .exe and will run in the context of the user and can do everything that your application can do.

Pentaho 5.0.1 CE Adding folder to pentaho-solutions directory

How do I get a folder to appear in the browser after adding it to \pentaho-solutions in Pentaho 5.0.1 CE. The documentation I read does not seem to work with this new version.
1. Create a new directory in /pentaho/server/biserver-ee/pentaho-solutions/.
Use underscores instead of spaces in the solution directory name. Ensure that the directory has the appropriate user
and group ownership to be writable from the BI Platform.
2. Using an XML-aware text editor (or Design Studio), create a file named index.xmlin your new solution directory.
3. Copy the following text into the index.xml file, changing the content accordingly:
***<index>
<name>Example Solution</name>
<description>This solution contains examples I created while learning to
work with action sequences.</description>
<icon></icon>
<visible>true</visible>
<display-type>icons</display-type>
</index>***
4. Save the file and close the text editor.
5. Log into the Pentaho User Console as an administrator.
6. Refresh the solution repository cache by going to the Toolsmenu, then selecting the Refreshsubmenu, then
clicking on Repository Cache.
You now have a new solution directory. It will show up in all file dialogues in the Pentaho User Console as well as the
Solution Browser in the left pane.
Every time you add or edit an action sequence to your solution directory, you must refresh the repository cache as
explained above. Each user currently logged into the Pentaho User Console must also refresh their session cache; this
is best done by re-logging into the Pentaho User Console.
I am using Pentaho design studio to develop an xaction sequence script. I followed this procedure:
1. In Design Studio, go to the Filemenu, then select New, and click on Other...in the sub-menu.
The Newwindow will appear.
2. In the Newwindow, click the triangle next to Pentaho, select New Action Sequence Wizard, then click Next.
3. In the File namefield, type hello_world.xaction.
4. Select Hello Worldfrom the Templatedrop-down box, then click Finish.
The wizard will generate the new file and bring you back to the workbench.
5. Click on HelloWorldComponentin the Process Actionssection on the left.
The right side of the screen will change to show the options available for this action: Nameand Message. The
Name field controls the name of the component in the Process Actions list on the left; it doesn't do anything else of
note. The Message field contains the text that will appear on the screen when the action sequence is run. It is prepopulated with %quote, which is a token that represents a quote message in a nonexistent properties file. Pentaho
used to provide properties files for each example, but they have been removed from the standard Pentaho Business
Analytics distribution.
6. Replace the %quotewith a sufficiently inspiring message.
Alternatively, you could create a hello_world.propertiesfile and populate it with the appropriate messages and
tokens, but that has no advantage unless you intend to internationalize this action sequence.
7. Save the file.
You now have a working action sequence that prints a short text message: "Hello, World." plus whatever you typed into
the Message field. The first part of the message is determined by a message bundle packaged with the Pentaho Web
application archive.
To test the action sequence, use the Test tab if you are on Windows or OS X, or log into the Pentaho User Console and
run it from the Solution Browser.
Running the sample xaction fails with
Sorry. We really did try.
Something went wrong. Please try again
or contact your administrator.
I figure this is because pentaho cannot locate the xaction file as specified in the file path when I generate the url from within design studio. The folder I created within the solution directory does not appear in the browser directory list despite refreshing the cache. Any help?
With Version 5 the files and folders are no longer stored in "/pentaho/server/biserver-ee/pentaho-solutions/..."
It is stored now in a jackrabbit repository.
You can create folders and upload files in the user console.
I did mistake after starting biserver 5.2. Unexpectedly i deleted Public folder after configuring to jackrabbit. Now how do i create the folder so that i can see Public and Home Folders.
Sorry for getting back to this question some time later, just in case someone searches something related to Pentaho repositories management with no success, i hope this information can help.
Just to make things more clear, i'm using version 5.2.x and i'm supposing you want to create a new folder on the root directory of Browse Files screen, something that is not allowed on Pentaho5 CE Web Console.
The answers about repository management based on JackRabbit are correct, so the old way we used to configure new "solutions" folders doesn't work anymore. From version 5 on, Pentaho exposes an interesting REST api that allows you doing things not allowed in web console.
For instance, for creating a folder in root directory you should create a http REST PUT request against Pentaho Server (using tools like curl or if you appreciate Google Chrome, something like Advanced Rest Client, etc.) using the following URL:
http://localhost:8080/pentaho/api/repo/dirs/:new_directory_name?userid=admin&password=password
Pentaho repository directory REST api is documented here:
http://javadoc.pentaho.com/bi-platform500/webservice500/resource_DirectoryResource.html
It's worthy to spend some time reading REST API the documentation.

where does asp and iis 6.0 get its date format

I've found a dilly of a pickle with a new web server. We have a new web server that is displaying dates differently than our old web servers.
We are running asp classic web pages on IIS 6.0 with windows server 2003.
We have logged in as an administrator and set the regional settings as appropriate and then applied the settings to current user and default user profile.
We then went into registry and update the appropriate formats under HKEY_USERS/.default/control panel/international.
Update the asp.net configuration for our websites to the correct code-page and locale.
Does anyone have other places that the application could be getting date formats from?
I know this isn't the 'proper' way to fix the issue. However, the application was written many years ago, getting something through planning/change control would be a pain, and is the only application running on the server. Thus it is okay to configure the server to cater to this single application. Besides it was driving me crazy that a new server that should be configured identically to an old server was not working.
It turns out that in addition to HKEY_USERS/*/Control Panel/international, there is a setting for non-unicode programs. It can be found under HKLM/system/currentcontrolset/control/nls/language/Default. Set that to the correct code page and it is golden.
On the other hand, if you prefer to not modify the registry directly, you can update all these values through the Regional settings from the control panel.
You can adjust the formats through the 'customize' button.
You can change the 'language for non-unicode programs' under advanced tab.
Just make sure that you check the 'apply to the default profile' at the bottom of the advanced tab.
I don't think the highest vote answer is right, though it's close.
I had to use regedit to change all the internationalization settings of HKU\S-1-5-19\Control Panel\International (NT Authority) and HKU\S-1-5-20\Control Panel\International (Network Service) to match the settings that were already in HKU\S-1-5-18\Control Panel\International (Local System).
This worked perfectly.
I modified all the settings I could see which were different, by hand.
I should think I only really needed to change the settings for S-1-5-20 (Network Service).
Go to Control Panel -> Regional And Language Options, set all options you need, then under 'Advanced' tab select settings for non-Unicode programs and check 'Apply all settings to the current account and to the default user profile.'. Press OK and restart server.
On Windows Server 2008 administrators have additional 'Administrative' tab. There press 'Copy to reserved accounts'.
Classic ASP Defaults to the Locale ID that was configured when the server was Setup. If you have access to the original server run the following code to get Locale ID it's operating under and verify that the new server is using the same.
<%=Session.LCID%>
If the Locale IDs are different and you cannot change it on the new server then you can add a line to the Session_OnStart sub in the global.asa for the application that assigns the correct Locale ID to Session.LCID.
Using an ASP page with the content:-
Response.Write GetLocale
Might be informative, it'll show you what locale VBScript thinks its using.
I've seen issues like this in the dim and distant past when using integrated security. The ASP caches the regional details from a user hive when it first needs to use them then continues to use those settings until the process dies. ASP gets these settings from the user hive associated with the user identity the code is currently running under. Most of the time that would be DEFAULT because the user doesn't have a profile on the system.
However if the user happens to have logged on interactively to the server they will have a profile and so their settings are used. Hence I've seen situations where the server appears to have intermitten problems with regional settings.
I can't recall if I've seen this on IIS6, I've definitely seen it on IIS5.
If you run your ASP application under a different account (not IUSR_Guest)
Login as that account, set date/time format to what you want and restart IIS.

Resources