Open a custom Finder Window on plugging in USB - finder

I would like to open a custom finder window on plugging in a USB drive without activating any applescript on the Mac.
I know for sure that it is possible because, I have a USB from VMWare (VMware fusion app) that does the same. As soon as I plug in the Fusion app USB, it opens up a custom finder window.
Could someone help me out with this please?

Have you taken a look at this?
http://jordan.broughs.net/archives/2008/03/creating-cross-platform-windows-and-mac-installer-cds
It rounds down to creating a custom .dmg and then burning it to the usb key with the following command sudo dd if=~/path/to/image.dmg of=/dev/rdisk{N} bs=1m
where {N} should be replaced with the correct disk number that you can lookup at: diskutil list
That's all there is to it.

Related

Claim device is not working while using the EPSON TM-T88VI printer once we upgrade it to Advanced driver printer from ADK 270

My POS Terminal has installed the Epson driver ADK 2.70E for model EPSON TM-T88VI.
That time the printer was working fine from my POS Terminal application which is in C++.
The registry contains the key in \HKEY_CLASSES_ROOT\OPOS.POSPrinter
enter image description here
In Device MAnager,
the device is displaying in the USB prot.
enter image description here
In Devices, it is displaying in the Unspecified category,
enter image description here
And from my application it is working fine without any problem.
Then I Installed the advanced driver version APD 512E on top of it.
And then try to print the receipt from my application which uses C++
code the print is not happening.
The OPOS error returning as 106 during the claimDevice funciton.
Device MAnager,
enter image description here
Devices,
enter image description here
If I uninstall the Advanced driver it is working fine from my application, like to know y it not working once we upgrade it to Advanced driver ?
Is there any Language compatibility is there, that c++ is not compatible for this Advanced driver ?
You should be concerned with hardware and software mode settings and related APIs, whether C++ or not.
Advanced Printer Driver and OPOS ADK are exclusive and can be used with only one of the settings.
If you want to use OPOS, delete the TM-T88VI related information from the Windows printer list and printer queue, and uninstall Advanced Printer Driver.
If you want to update OPOS, please get it from the above link and update it.
In response to comments:
As per the question in your comment. However, it depends on the hardware settings. It cannot be handled simply by changing the API used.
If you want to use Advanced Printer Driver, you need to use this utility to change the interface hardware settings from vendor class to printer class.
TM-T88VI Utility
Then print using the standard Windows desktop printer API.
Printing (Documents and Printing)
In that case, you will create image data for each page of the print content and print it as bit image data.
If you want to print using printer fonts, cut paper or open a cash drawer, you will need to create and embed RawPrinterHelper.
Send raw data to a printer by using the Win32 API
Print Direct To Windows Printer (EPOS Receipt)
How to send page cut command to Epson printer
Furthermore:
You probably can't use it like a question in a comment.
is that the behaviour of the driver or any other way to add the device to qindows printer without installing Advance printer drivers ?
To be able to use it as a Windows desktop printer, you need to install some printer driver, even if it is not an Advanced printer driver.
For example, it seems that it is no longer provided in windows 10, but before that there was a generic text only printer driver.
You will need to have some such driver installed.
And perhaps if you install the windows printer driver and create a print queue, it's likely that the connection port will be occupied at system startup and will not be available to others.
This corresponds to the phenomenon of "3. The OPOS error returning as 106 during the claimDevice funciton." In the question.
About: what u mentioning as hardware settings ?
This is the interface mode setting by the TM-T88VI Utility described above.
Printer class or Vendor class of USB.
However, if it is currently available in OPOS, you do not need to consider it.
Rather, it should not be changed.

Printing using libusb

Hello I am working on project that need to print directly to USB printer (POS printer). The application is running on Linux, right now i am using the usblp to print by write ESCP command directly to /dev/usb/lp0. Everything goes well, but the problem comes when user plug a printer that not detected as usblp on Linux.
So instead of depends on linux kernel usblp, I would like to directly write the data to USB device using libusb. So my question will be:
Is it OK to send directly the ESCP command to printer using libusb.
From the libusb docs, to open and configure usb device there are some step to do. Should I open and configure the usb when printing OR I open and configure once and keep it open so I don't need to open and close when I want to print?
If I want to open and close printer when I want print, is it fast for opening, configure, and claiming an USB device using libusb?

Label a storage volume in Windows Compact 2013

I have an (non-MFC) Windows application written in C++ (Visual Studio 2013) running on a small device running Windows Compact 2013.
The device has two storage volumes (internal flash memory and SD Card)
If I connect the device to a Windows PC via USB cable, the volumes are mounted and I can see them as two separate drives inside Windows Explorer. I am then able to change the label of each volume inside Explorer (right click on the drive -> Properties -> type in a new label)
I would like to have the ability to label the volumes from my application running on the device.
I have tried various Compact 2013 API calls without success (obviously the Compact API is far more restrictive than the full Win32 API).
I have even tried to call a script file to call the LABEL command. Also without success.
Can anyone offer me any advice about how to accomplish this? Any help would be much appreciated
Many thanks
In the end, the solution was surprisingly simple. I added an autorun.inf file to the root folder of the device with the following content
[autorun]
label=My Label
This had exactly the effect that I was looking to achieve.

No FS0 in EFI Shell

I want to try programming for EFI so I created a VM using virtualbox, checked "enable efi" option and left CD empty.
The efi shell boots how it should but instead of FS0 i only see BLK0, BLK1 etc. Is there any way to have FS without inserting USB disk (which is displayed as FS)?
Edit:
Thanks for your replies. For people who still want to use VB - formatting VB disk with DISKPART using Windows CD solves the problem.
#unixsmurf answer in comments is correct. Your image need file system supported by UEFI. If you can't see fsX in output of map command then it means that non of attached block devices (blkX) contain supported file system. Please create FAT32 partition on your disk, then you will be able to see fsX in map output. To switch between file systems use DOS like syntax command ie. fs0: switch to FS0 file system.
According to UEFI specification 2.5 section 12.3:
EFI encompasses the use of FAT32 for a system partition, and FAT12 or FAT16 for removable
media.
I would suggest to use OVMF (Open Virtual Machine Firmware) directly with QEMU not through VirtualBox. Why ?
Because you can hack OVMF and learn how it works internally, this give you better understanding, VirtualBox hide internals and I'm not sure if it allow firmware replacement
OVMF was developed initially for QEMU and it is adapted by various other virtual machines, because of that there is much more support for OVMF on QEMU then OVMF on VirtualBox
using QEMU also give you ability to emulate your hardware and write drivers/applications in UEFI that use it
I wrote beginners tutorial that help setting up development environment needed for UEFI application development using OVMF.
More about OVMF.

Path to a USB Device in Windows

I would be using a USB hub to connect multiple devices. I want to fix a specific USB device to a particular slot. Then check if it is done properly.
The way I am planning to achieve this is to get the complete USB path like
PCIROOT(0)#PCI(1D00)#USBROOT(0)#USB(1)#USB(2)#USB(3)#USB(3)
I can get this particular string in w7 via device property but the same is not available in wXP.
You can build this path by using the SetupAPI.
The device manager is built with this.
You start with CM_Locate_DevNode and enumerate children with CM_Get_Child.
I strongly advise you against what you're planning to do. AFAIK a USB device MUST function regardless on the USB port it's plugged in. If you'll creating such a device, forget e.g. about the "Certified for Windows" logo.
Just handle WM_DEVICECHANGE message, then use e.g. WMI to search for the USB device you're interested in. Here's my article about it: that time I coded C# language, however WMI has C++ API as well.