I am attempting to make our webpage open when someone plugs in our USB device.
My Problem: When we plug in the USB device the autorun dialog appears but there is never an option to open/run the webpage we have specified. See below pic of the dialog we see. Isn't there meant to be an option that says something like "Open in Internet Explorer" or etc.?
What we are hoping to achieve is to have another option below 'Use this drive for backup' that says something like 'Open in Web Browser' or something that will ultimately open our webpage when the users decides to.
Heres our code that is inside the file autorun.inf which is placed on the USB device:
[autorun]
shellexecute=http://exds-test.epicservices.com.au/V10InstallationInfo.aspx
action=Open Website
label=EXDS USB Drive
According to this link, this will not work on modern OS versions
http://www.flashbay.com/services/usb-autorun
You've got to use a "helper" application.
Related
I am trying to allow a POS web app to print directly to a StarMicronics (or any receipt printer, for that matter) using the Chrome webusb API.
I am using the example here almost exactly except I have modified the vendorId filter to the Vendor ID of StarMicronics. I have also tried it with a completely empty filter. It works great on the Mac computers I have tested it on, but the problem is on Windows.
When I click the print button, Chrome opens up the connection window, my device is listed and I can select it and click Connect. So navigator.usb.getDevices() is working great. When I refresh the window, after having connected the website to the device, Chrome finds the device again with no problem.
The problem comes when I try to do device.open(). I get this error in the console: DOMException: Access Denied. From this point, I can't do either device.selectConfiguration() or device.claimInterface() because I get the error that the device must first be opened, obviously.
I have enabled all the flags I know of in Chrome:
#enable-experimental-web-platform-features
#enable-webusb
#new-usb-backend
But none of this has helped. I have also tried using other printers, such as an HP deskjet and a Dymo Label Writer all with the same resulting error message that access is denied.
Again, it is working fine on Macs.
Any help on this would be greatly appreciated.
You get the "Access Denied" error on Windows because there is already a driver that has claimed the device. The Windows driver model requires that the "winusb.sys" driver be loaded for any device that will be accessed by a userspace application like Chrome.
See my answer to this earlier question about smartcard readers which encounter the same difficulty on Windows.
You'll need to first download the Star Micronics Windows Driver (available here for the SP700). You want the "USB Vendor Class Driver" (again, available here for the SP700)
Of course, there is no auto-installer (to my knowledge), so you'll have to open up the StarUSBVendorClassDriver_... zipped folder, and navigate to Manuals/usb-vendor-class-driver_im_en.pdf.
In reading this, you'll notice that you actually need to install the driver from the CMD line with the following cmd (note the <version_here>, don't COPY+PASTE):
pnputil -a StarUSBVendorClassDriver_<version_here>\USBVendorClassDriver\SMJUSBCOM.INF
Once you have the correct driver installed, download the Zadig utility from the download page here. The website is ad-ridden, but I had no problems.
Open Zadig, toggle the "Options" menu dropdown, and toggle "List All Devices".
You should then see your device in the drop down below. Select it as shown below.
Then, on the LHS dropdown, you will see a "non WinUSB" driver selected. On the RHS, ensure that WinUSB is selected, and click "Replace Driver".
This should enable WebUSB! Happy printing!
I got a letter in the mail that contained a small USB device. Here is what it loks like: http://imgur.com/a/VEtNK
When I plug it into my computer it seems to hover over the programs in my Dock and then opens one. It then types a link into a text field that is available. I originally had Skype in the dock and it defaulted to that one, strange. I removed Skype from the dock and now it opens to System Preferences.
Here's a video of what happens as I plug it in: https://www.dropbox.com/s/yuw6ggvo77rkvwh/Test1MysteryDevice.mov
Also, it does not appear like a memory stick does on my computer. I can't seem to locate it when it's plugged in. It would be cool if I could find it somehow. It would be even cooler if I could program it to do something I wanted.
Thanks, and if anyone can help out that's awesome or if you could point me to a forum/anywhere that might be able to help out, that'd be great!
Probably it self-identifies as a HID (Human Interface Device), specifically a keyboard. As soon as it is accepted as a keyboard by the OS it can send any sequence of keystrokes, and the OS will assume that it is input from a human user.
Scripting such behavior is easy using Applescript.
However automatically running a program from a USB stick when it is inserted is supposed to be impossible on OS X, as auto-run is a security risk.
Of course at the very least a custom USB device could be made to act like a mouse and keyboard, so even without autorun it's a risk to plug strange devices into your computer.
To get more info on the device you can go to System Profiler and look for the device on the USB bus.
If it is a custom device pretending to be a keyboard then it's probably hardwired to do what it does, and you probably won't be able to reprogram it; you'd need to find a manufacturer that will sell you customized devices.
I'm working on a device that writes some information directly to a flash drive, without using any file system (it just writes blocks of data directly to the disk sectors). After the flash drive is filled, I need to plug it into any computer with windows and read data using my application.
Everything works great except for when I plug the flash drive in windows warns me that flash drive is invalid an offers me to format it. I want to get rid of this message for my flash drives on any computer that have installed my windows application.
My flash drive have signature bytes at the start so I can always make out whether it's my flash drive or just a regular flash drive.
My idea is that I should be able to write some sort of service or driver which will check all flash drives and will disallow OS to mount my drives. However I don't know whether its really possible and I can't find any documents mentioning this sort of functionality.
I'd appreciate any docs / links / functions names that can help me suppress unformatted disk warning.
Make a tiny real partition at the start and format it to keep windows happy.
Then just use the rest of the drive as you please
This seems to work:
Remove the drive letter assigned to the device:
Right-click the 'Computer' (or 'My Computer') icon on your desktop or in the Start Menu and select Manage. The 'Computer Management' window should appear.
From the list on the left, select 'Disk Management' (within the Storage sub-tree).
Right-click the encrypted partition/device and select Change Drive Letter and Paths.
Click Remove.
If Windows prompts you to confirm the action, click OK.
I'm creating a FAT32 formatted USB Stick/Drive to ship a product. We'd like it to behave a bit more like the hybrid CD/DVD's that we create:
Insert the disk on Mac 10.6 or later and the drive opens up and shows you a window with the application in it. We can do it from a DMG or CD but the USB drive doesn't seem to want to honor the bless command.
On Windows, we've set up an autorun.inf. On XP it's not showing the icon, label, or opening the specified file. I know that you can't have Windows Vista and Windows 7 automatically open something or add an entry to the AutoPlay list by default, but it still should show the Volume Label and icon.
Here is my autorun.inf:
[AutoRun]
Action="Install My Cool App"
Open="InstallThis.exe"
icon="Ultimate.ico"
[Content]
MusicFiles=false
PictureFiles=false
VideoFiles=false
Are these things too much to ask for a USB stick? Anyone else out there shipping things on a USB flash drive and have overcome these issues?
As of Windows 7, AutoRun feature is not supported on USB drives. Only the following commands are supported:
label
icon
See Improvements to AutoPlay on Engineering Windows 7 blog.
Examples in Autorun.inf Entries do not use quotes for values. Does it work without the quotes?
MacOS might have implemented a similar approach to Windows 7: do not autorun anything from a flash drive automatically to protect you from malware.
I need to have a flash file be opened and viewed from a USB automatically on both Win and Mac.
I read about various solutions depending on the format of the flash output:
autorun.inf if Flash published as exe(Win)/app(Mac)) which seems to be working only on Win;
html embedding if Flash is published as swf, but this turns into a problem of launching html file.
What is the best known practice/solution?
For the PC, you can use an autorun script. On the Mac, there is no such feature (thankfully). What you can do on the Mac is have the Mac partition open, and using a background image, display instructions to "click here to start", or whatever other verbiage you desire, pointing to your Flash Projector file.
will this help ?