简体   繁体   中英

Single Sign On through IE

I'm currently building a web interface that lists a load of data for data entry to peruse through. The website doesn't actually update our back end though. We have a vendor supported custom built Windows application which we use for our data entry.

This web interface is replacing some excel lists + VB. The Excel version of this system is able to pass some data to an already open instance of a custom Windows application and bring into the app a certain ID that's clicked on in Excel, so I'm trying to replicate this from the browser.

So far I'm able to get close by using this JavaScript within IE:

<script type="text/javascript" language="javascript">
function RunFile() {
WshShell = new ActiveXObject("WScript.Shell");
WshShell.Run(pathToApp, 1, false);
}
RunFile()
</script>

But this method I believe tries to open a new instance of the Windows Application. Not access the currently open version. I think looking at the VB code I need to use the windows "sendKeys" method.

It's not something I've ever done before, or needed to do. So It's very new to me.

  1. Is it possible to pass data to an already open Windows app via a browser?

  2. Are there any other options available, I was thinking maybe Electron could help here maybe? Or am I wrong and fighting a losing battle on this front?

Scenario sounds really complex but maybe you should check if this windows app can be integrated with Office Add-Ins .

From their site:

What can an Office Add-in do? An Office Add-in can do almost anything a webpage can do inside the browser, such as the following:

  • Extend Office native UI by creating custom ribbon buttons and tabs.
  • Provide an interactive UI and custom logic through HTML and JavaScript.
  • Use JavaScript frameworks such as jQuery, Angular, and many others.
  • Connect to REST endpoints and web services via HTTP and AJAX.
  • Run server-side code or logic, if the page is implemented using a server-side scripting language such as ASP or PHP.

In addition, Office Add-ins can interact with the Office application and an add-in user's content through a JavaScript API that the Office Add-ins infrastructure provides.

Web app

The minimal version of a compliant web app is a static HTML webpage. The page can be hosted on any web server, or web hosting service, such as Microsoft Azure. You can host your web app on the service that you choose.

The most basic Office Add-in consists of a static HTML page that is displayed inside an Office application, but doesn't interact with either the Office document or any other Internet resource. However, because it is a web application, you can use any technologies, both client and server side, that your hosting provider supports (such as ASP.net, PHP, or Node.js). To interact with Office clients and documents, you can use the office.js JavaScript API that we provide.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM