Here's the problem: I have a usb scanner (HP) and want to get the image through a web application. Solved long ago with a java applet but now chrome doesn't support them anymore.
I've already seen potential solutions. The "coolest" one was Dynamsoft but I can't afford on NPAPI or ActiveX. I've seen html5 websocket technology, the communication works but it seems that there are no way to interface it with the scanner.
I'm in a similar boat. Firefox has announced deprecation as well but has not yet set a date for end of support. Your only other option in the near future is to write your own plugin based on PNACL. I've made attempts at this and found it difficult due to PNACL limiting C source's functionality. If using Dynamsoft's products you'll want to use their Web TWAIN SDK which would cover most users, but again their price can be an issue.
In the future we might have some things to look forward to:
chrome.documentScan - only for Chrome OS, let's hope they port it back to Windows!
WebUSB - drivers in Javascript, not my cup o' tea
TWAIN Direct - driverless scanning, will not work with older scanners
I've got some workaround idea. It's not using NPAPI plugin so it will be compatible with modern browsers.
User must download and run installer. This installer contains some scanner software (compatible with most scanners) with support for command line and software to uploading files by FTP
I use NASP2 (support most modern scanners) to scan and WINSCP to upload by ftp (we need only winscp.exe amd winscp.com files).
I put WINSCP files to NASP2 folder.
Our installer create bat file ScanToMyWebsite.bat in NASP2 folder, something like:
#echo off
echo Scanning, please wait...
"C:\Program Files\NAPS2\NAPS2.Console" -f -o "%appdata%/NAPS2/temp/my_scan.pdf"
echo Uploading scan...
winscp.com /command "open ftp://login:password#our_ftp_server.pl" "put ""%appdata%\NAPS2\temp\my_scan.pdf""" "exit"
echo Done!
This bat file just scan document and upload it to ftp server.
Then our installer register new protocol in system - for example "scan-to-my-website:" (it's like http:, ftp: etc.) by exec .reg file (our installer do this):
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\scan-to-my-website]
#="URL:scan-to-my-website Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\scan-to-my-website\DefaultIcon]
#="C:\\Program Files (x86)\\NAPS2\\NAPS2.exe"
[HKEY_CLASSES_ROOT\scan-to-my-website\Shell]
[HKEY_CLASSES_ROOT\scan-to-my-website\Shell\Open]
[HKEY_CLASSES_ROOT\scan-to-my-website\Shell\Open\command]
#="\"C:\\Program Files\\NAPS2\\ScanToMyWebsite.cmd\""
Now we can create in our website
Scan!
After click on this link it just run bat file which we created and upload scan to ftp server.
By AJAX or any other method website can check is file has been uploaded.
That's it :)
Related
I have a question now because IE was not maintained after 2022/6/15 also as the ActiveX
We have the ERP system only can use ActiveX By GDC(Genero Desktop Client), But now it can't use.
I google for it and found that I can create a shortcut By GDC, than export the shortcut on my desktop, that I can double click the shortcut to run my ERP system not using any browser(IE、chrome、EDGE...etc)
Now I want to create a webpage include this shortcut, let my co-worker can click the button on the webpage to run ERP system
If I use href to call the chortcut, it always show 404, but on the server I can double click shortcut to run the ERP system.
Can anyone tell me the problem or how can I do for it?
(ps. the shortcut like xxxx.gdc)
Thank you for your Reading, if anything I missed Please tell me
You don't state the Genero version you are using but given the use of ActiveX it is probably an old version.
The GDCAX (Genero Desktop Client ActiveX) version was deprecated with the release of Genero 2.50 in November 2013 (http://4js.com/online_documentation/fjs-gdc-manual-html/#gdc-topics/c_gdc_MI25x_250.html). This was coincident with Microsoft treatment of ActiveX. If you were still using GDCAX from version 2.40 or earlier you are missing out on 10 or more years of development. This is the equivalent of continuing to run iPhone 4, Android 4, Windows 7 or earlier.
Genero including both the Genero Desktop Client (GDC) and the Genero Web Client (GWC) (now renamed Genero Browser Client (GBC)) has continued to be maintained and developed since then with releases every two years.
The documentation for current supported versions can be found here https://4js.com/download/documentation/. For older documentation, look for the section Archived Releases on the right.
The standard GDC is an executable (Windows, Linux, OSX) that sits on the users workstation and communicates to the fglrun Genero process on the back end server.
When referring to "shortcut" you need to distinguish between GDC shortcut and Desktop shortcut.
The 'GDC shortcut' is the instructions to connect to the back end server and start the fglrun process using the GDC to render it on the front-end.
This can be configured as a 'Desktop shortcut' which can be placed on the desktop, this will start the GDC executable and then initiate connection to the back end server. (just the same as clicking on a Desktop shortcut for an Excel spreadsheet will start Excel executable and open the spreadsheet). If you are putting a link on a webpage expecting it to start the GDC executable this is where you are starting to go wrong, see plenty of stack overflow posts such as Open an exe file through a link in a HTML file? on why you can't start an executable from a web page.
If you want to run a Genero application in a browser you should be using the Genero Browser Client or what was probably the Genero Web Client in the version you are using. The URL used in the GDC-AX configuration was pointing to the Genero Application Server (GAS) and to an .xcf file. (This URL probably would be of the form .../wa/r/... , the bit before the /wa/r/ helps to find the web server and application server, the bit after the /wa/r/ finds the application .xcf or entry in the .xcf configuration file. What you probably need to do is point to a different application, one that is configured to use the GWC and not the GDC.
Have a look inside FGLASDIR/etc/as.xcf. Find the entries '<APPLICATION Id="gwc-demo" ...', '<APPLICATION Id="gdc-demo" ...'. These both start the demo program, one using the GWC, one using the GDC. So just as your ActiveX could be configured .../wa/r/gdc-demo to start the demo program in the GDC, you could also type .../wa/r/gwc-demo into a browser to start the demo program in the GWC, the difference in the <APPLICATION entries being the value in the Parent node which point to different OUTPUT nodes GDC-AX vs GWC.
So find the URL in your ActiveX config, find the entry it is pointing to in your GAS config, either inside the main .xcf or it has its own .xcf, and then create a new entry in the main.xcf or create a new .xcf that uses GWC and not GDC.
Your Four Js support contact should be able to assist you in this.
Looked here first on how to do that and found a lot of references but not up-to-date (windows 10)
Tried "net start usbstor" but that is not supported it seems.
It appears I need devcon.exe which is part of a huge windows 10 sdk download includeing visual studio
This is my problem, maybe there is another solution:
I have a number of USB 3 external drives they are not used all the time so they go to sleep (the drives, not the computer). This is fine but occasionally one or more of them never wake up when I tried to access them. They are on a server and I access them through the file manager on my desktop. When they do not wake up I have to use remote desktop to run "device manager" and disable "Renesas USB 3.0 eXtensible..." and then enable that host controller. Immediately, all the sleeping drives wake up. I would like to run a program from the command prompt preferably from my desktop and not have to log in using splashtop or VNC. From googleing it seem devcon needs to be on that server.
Maybe there is a service I can start or stop remotely? I did not see usbstor listed as a service.
Thanks for looking!
[EDIT] Wanted to to follow up on this post. I read harvey263 suggestion but I decided I wanted the disks to sleep as they are used rarely and I have no interested in buying a 2TB replacement disk anytime soon. However, I did want to post about that devcon program. I was unable to located the device kit for win10. It was not in
Directory of C:\Program Files (x86)\Microsoft SDKs
after downloading a huge amount of stuff I did not need, but I discovered that splashtop remote (or server which I already had in all my systems) includes devcon support in its free download and the program is tiny and easy to install. I did have to move their devcon support from
C:\Program Files (x86)\Splashtop\Splashtop Remote\Server\Driver\Monitor\utils
into my personal download directory as I wanted to execute it upon login and I could not do that from the task scheduler on account of permissions or authorizations. For example, I put
devcon64.exe remove "PCI\VEN_10DE&DEV_026D*"
devcon64.exe rescan
into a task executed once on startup and it disabled the USB controller connected to the drives and then re-scanned, reinstalling the driver and wakening the drives. It also removed the yellow bang that was always on the driver every time I rebooted.
You might be able to alleviate the sleep issue by changing the USB setting in Advanced Power Options (control powercfg.cpl,,1). I think "selective suspend" is normally Enabled by default.
For devcon.exe you only need to download the Windows Driver Kit. It's not that big and you can copy devcon.exe out to run standalone and uninstall the rest if you want. I have scripted devcon to "re-enable" a device like this:
devcon disable *ROOT\NDISVIRTUALBUS*
timeout /t 5 /nobreak
devcon enable *ROOT\NDISVIRTUALBUS*
You could put this in say "\\RemotePC\c$\Scripts\EnableUSB.bat". Then call it with psexec like lit mentioned:
psexec \\RemotePC cmd /c ("C:\Scripts\EnableUSB.bat")
I'm working on web application that deals with files of different kinds and stores it's metadata (e. g. if it is Microsoft Word file, then I try to parse it, if JPEG - EXIF, and so on).
General workflow: the user selects a file stored in a database, presses check out file, then default user editor / viewer (e. g. for PSD - Adobe Photoshop) will be opened on user's PC. When user finishes working on file, she presses check in and web application uploads file for further post-processing.
Right know this workflow implemented using Mozilla Firefox AddOn SDK (particularly sdk/io/file and OS.File methods): web application interacts with an extension for downloading / uploading file. So my application is tied to Firefox. But guys from Mozilla is working on WebExtensions API and I'm afraid in future they will deprecate AddOn SDK at all. Unfortunately, WebExtensions API doesn't provide functions for interacting with a file system.
So my question is: is there any other ways to interact with file system from web application? May be WebAssembly will provide such capabilities (bad luck, due lack of documentation, I can not find any sensible information about it)? Anyway I want to write application that will be compatible with major browsers, so I don't want to deal with extensions / addons anymore.
I have my first brand new google chrome extension, which I'd like to upload to the chrome web store. The thing is that my extension is using native messaging via stdio to a c++ exe. The extension also required a registry key to be installed.
Is it possible to upload the required files to the chrome web store (including exe and dll dependency)? Is there a way to automate the installation of the registry key (required to send messages from chrome extension js to exe), and register dll?
The idea behind chrome-extensions (and native messaging) is to limit the giant security hole that is NPAPI: to create a divide between the browser and the desktop that runs it. For this reason, you'll need to perform two separate installations: one for the extension and another for the native code.
To the best of my knowledge, you can't bundle the binary with the extension. But you might be able to (partially) do it the other way around: have the native code also install the extension:
There is a way to partially automate the process of installing the extension: you can pre-load the extension via the registry. This only applies to extensions on the chrome web-store (CWS). I believe this requires to reboot chrome. And of course the user is notified that an extension was installed. see here - https://developer.chrome.com/extensions/external_extensions
There's also something called "inline installation" - not quite "automatic", but this should make it easier for your users to install the extension from "within" your site (as opposed to the CWS). The extension still needs to be hosted on the CWS, but the user needs not navigate there.
see here - https://developer.chrome.com/webstore/inline_installation (and especially the line section - about verified site - which requires that you register your site with Google - and thus may render this technique useless to you)
For enterprise intranet web application, is there any way to create a desktop shortcut of web application on user's desktop? I'm looking for functionality similar to Google Gears, but without installing Google Gears. I'm looking to give user's a link on web application that says "Click here to install desktop shortcut", when they click on it, a desktop shortcut is installed with the custom icon for our application. Is there a way to do it using javascript or any other client side technologies? I don't want to run any exe on user's machines. Even though it's intranet, I have to jump through lot of corporate hoops, compliance approvals, etc to run exe on their machine. We are trying to avoid that, due to time constraints. User machines are windows XP with IE6 installed. They may all upgrade within next year's time to Windows 7 with IE8. Intranet web application in question is developed using asp.net 3.5, c#.
If this is really a corporate environment then just go talk to the network operations team.
It should be trivial for them to add something to the login script to push this link to the people's desktops.
More Info:
http://www.petri.co.il/forums/showthread.php?t=6154
http://social.technet.microsoft.com/Forums/en/winserverGP/thread/02a7bfbb-180f-40eb-82e3-2343b2bf31eb
Alright, at first I thought that this was an impossible task, until I realized that it's not.
A shortcut is just a file, and we all know you can download files from links.
I'm not sure how well windows shortcuts can be transferred from computer to computer, but I would assume that a shortcut with a location like http://www.google.com/ is not tied to any specific windows machine.
You could zip the shortcut, and point the link to the location of the zip file. Tell the users to unzip the file and place the shortcut. You may be able to just serve the shortcut, but you'd have to give the right headers, and probably specify application/octet-stream or something like it.
Alternatively you can tell them to right click, go to new -> shortcut, and copy-pasta the url into the location box.
Alternatively you could write a batch file for the users to download that opens a url in the default browser.
I know it's not quite as direct as click-button -> receive bacon but it will work.
Try looking at SaveAs
document.execCommand("SaveAs", false, "url to desktop");
The user will still have to click save and it only saves a HTML page. You would have to open a hidden IFrame containing a web application and call .execCommand on the iframe's document.`
You can create a shortcut (.lnk) file in a directory in your site and put it as the Url for a hyperlink so the users right click and save as they download the .lnk file. Your server will need the mime-type .lnk application/x-ms-shortcut adding.
The icon can be done by putting it on a network location and using the "Change icon" function to refer to this network location. This works on Windows. I suppose it could be adapted for each OS required?