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")
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.
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 :)
I am working on a small web api project in Visual Studio 2013 Ultimate. Windows 2013. Internet Explorer 9. When I run (debug) from VS using the internal web server (I guess that is IIS Express, now), I am finding that the changes I am making (and saving) to a javascript page are being ignored. Placing a breakpoint in the javascript shows the older code without my changes.
CTRL+F5 does not force the application to use the currently updated page. Checking the page in, then checking it back out often works. Is there some setting or trick that will help me out here?
Clearing the cache history seemed a bit excessive and I don't want to do that all the time.
The following solution worked me in Internet Explorer:
First enable script debugging:
Tools menu -> select Internet Options
On advance tab uncheck "Disable script debugging (Internet Explorer)"
Then make sure you get the newest page:
From the Tools menu choose Internet Options.
On the General tab, under Browsing history, click Settings.
Under "Check for newer versions of stored pages" make sure "Every time I visit the webpage" is selected.
Click the OK button.
If somebody has this problem and ctrl+F5, clearing browser's cache, restarting debugging, changing browser, changing web.config and rebuilding project don't help, then there is one last thing that works (at least for me): restart Visual Studio.
Also changing debugging port on local IIS Express helps but this is far more painful if working in a team or using Azure Active Directory etc.
Only solution that worked for me was changing the javascript file name and updating the bundle configuration to point at the new file. I tried everything else from restarting my pc, deleting bin/obj/cache/etc, CTRL F5, restart IIS, and so on.
If I'm correct you should build (ctrl+shift+b) your project before debugging. This web server runs in the background on a port of choosing whenever you start in debug mode. You can close the task(s) (process bar next to your clock) if you need a new session or press F5 in VS.
You can avoid using the built in web server if you have IIS (Express) or something similar.
Go to RUN and type iis depending on your OS it's already installed. Otherwise try to install it in Control Panel > Programs or Features > Turn windows features on or off
add a website (site name, path, hostname)
add to your host file 127.0.0.1 hostname (c:\windows\system32\drivers\etc\hosts)
To debug your project in Visual Studio:
open your website on your hostname in your favourite browser
click on DEBUG
click on ATTACH TO PROCESS
find w3wp.exe
hit ctrl+f5 in your browser to start debugging server code
Depending on how your solution/project is setup, you can publish your project files directly to IIS if you choose to publish to File System. Right mouse click on your project and choose publish. Set it up from there.
If your Visual Studio is up-to-date you can publish single files with alt+$+p.
Hope it helps.
Locate the code section where the JavaScript file is loaded to the page and add a parameter string to the end for testing. For example:
Change src="../Resources/js/MyScriptFile.js"
To src="../Resources/js/MyScriptFile.js?v=23"
Every time you update your JavaScript file, you change the version number. This will force the browser to load your new version of JavaScript file. After you finished testing, You can remove the string "?v=23". The bonus, if you leave it there, the end user will not be required to refresh his/her browser cache after you deployed your code to production.
I keep getting this problem very often. Normally what I do is first get into the drive where the OS is installed (In my case C:), and delete all the application.dll and application.pdb (it is stored in Windows\Microsoft.net\Framework\vx.x.xxxxx\Temporary ASP.NET Files). Delete application.dll and application.pdb in the users\xxx. Get into the application directory and again delete application.dll and application.pdb. Clear the browser cache. Restart the system (cold restart). Build the application. Most of time found to be working.
Note: I use DOS prompt for deleting since I'm quite used to it. But the user should have admin privileges. It's not a perfect solution but it works.
What worked for me was
Shutdown Visual Studio 2013 update 2 (I have win 8.1 all 64 bit)
Delete clear out "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files"
Cleaned and Rebuilt solution
Restart IIS Express. If using IIS just re start app and pool.
Run in VS 2013 Debug (F5) it still loads the old file under Script Documents > Windows Internet Explorer > Page_Name.aspx
Then F12 Developer tools clear Browser Cache (IE), I have the same issue in Chrome
F5 in browser reload the page finally loads the changed JS script file with my debugger; entry and breakpoints set
So i had the same problem and i could avoid this by canceling the .ASP.NET-Server
.ASP.NET-Server from Visual Studio for debugging
from Visual Studio and restarting the debugging. Hope this helps someone.
I restarted Visual Studio and rebuilt the project, but the problem persisted for me -- the debugger continued to run an old copy of the .js file. The solution for me was to simply reboot the machine. (When all else fails...)
For reference, I'm currently using Visual Studio 2015.
I m creating a web tv on a Raspberry Pi
Since the RPi will not always be connected to the net, I need to download the file it will have to play before playing them.
I can download the file, but when I m starting too much download, either by starting them all-at-once or one after another (wich take a lot more time), my app end up killed by the linux system.
Is there any way, in javascript, in node.js, in bash or by editing my algo, to prevent the app from being killed?
as I commented ...
Look inside system log files (e.g. /var/log/messages or /var/log/syslog, or the output of dmesg command) for messages relative to your application (or to the node.js processes). You may have gotten out of resources....
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?