I was working on a win CE 5.0 device and changed the registry value of Launch50 (which is normally explorer.exe) to point to my application. The Problem is that the path specified in the registry entry is wrong and the device does not boot up properly. I do not have a means of connecting this device to my PC. is there a way to fix the registry entry by booting into a SD card or something of that sort. If there is How do I do this? The Device is a mini Point of sale (Wintec IDT700)
This is tough. Reverting to the factory state is very device specific. First stop is to check with the OEM.
Does the device have a mechanism to auto-run an app at startup from an inserted media or similar? If y\so, creating an app to modify the registry back would be an alternative.
Related
I am developing an application in C# .Net 3.5 Compact framework for a Handheld Computer which runs on Microsoft Windows CE 6.0.
I am able to create the installer and run the application, the hurdle what I am facing right now is, say the battery dies/you perform a Cold Boot on the device (the device is Datalogic Memor X3 http://www.datalogic.com/eng/products/healthcare/mobile-computers/memor-x3-healthcare-pd-814.html#), the application gets deleted, the user will have to re-install the application. I would like to know how to get rid off this problem? Is there something I need to do while building the Setup/Installer? There are other applications in the device which do not get deleted when performed a Cold boot.
Please advise.
Usually, the root filesystem of a Windows CE devices is RAM-based, using the object store. Mass storage devices are mounted as subfolders. This means that any application that is not installed on a folder connected to a mass-storage device will disappear when RAM contents are erased. In your case this happens when the battery dies because the device never actually turns off, just suspends and resumes.
You should try to install your application on a permanent folder, they should show a different icon in file explorer.
Most if not all vendors of Windows CE based devices offer a persistent storage area and factory reset / autoinstall procedure.
If the device is clean/cold booted, the 'normal' storage area is reset to factory default. So all custom applications and changes are deleted. When the device boots up, there is a OEM specific autoinstall process. You need to integrate your setup with the autoinstall.
Please see the Datalogic Memor X3 support page and look at the user manual on how to persist your application with this Datalogic device (I would have done that for you, but they require a registration).
UPDATE: see https://www.manualslib.com/manual/850035/Datalogic-Memor-X3.html?page=64#manual and read about Save Session and Save Setup.
At least you can use a SD Card with a special folder (ie 2577 for devices with ARM processor) and a custom autorun.exe inside. This will be executed automatically on every boot.
The situation:
We have a software suite that interacts with a device we built in-house. The device uses WinUSB for communications, EXCEPT when in boot mode during firmware updates. When in boot mode, the device uses a different VendorID and ProductID and uses HID for communication.
The problem:
To update firmware, we send a command across and tell the device to enter boot mode. The device re-enumerates with the new VID and PID. When updating firmware on a new machine that hasn't had a device in boot mode connected before, Windows does the "installing driver" dance when the bootloader shows up. (There's no driver to be installed). Software gets a DEVICE ATTACHED event, and so we begin the firmware update. Once Windows finishes "installing" the driver, it de-enumerates and re-enumerates the device, closing our file handle in the middle of the update.
The question:
Is there a way to detect if Windows is installing a driver so that we can wait for the device to be re-enumerated before beginning the update process? Is there something we can do in our install to preempt this behavior? Maybe a way to tell Windows that we don't want to allow driver installation while we're connected to the device?
Maybe a way to tell Windows that we don't want to allow driver installation while we're connected to the device?
Microsoft's Developer Network has a section for Hardware Development. They have an article specifically about this issue. Importantly, the document states that your device installation application should "determine whether other installation activities are in progress before performing its installations" (emphasis mine) and - if pending installations are found - "should exit".
This last part of the statement seems to indicate Microsoft gives precedence to already installing or pending device application installations.
If your problem statement is accurate:
When updating firmware on a new machine that hasn't had a device in boot mode connected before, Windows does the "installing driver" dance when the bootloader shows up.
It sounds like you may be out of luck - or breaking a convention - by attempting to preempt the driver installation behavior.
I would utilize the above mentioned CMP_WaitNoPendingInstallEvents function, and then firmware update your device. I think the VID/PID are irrelevant, here, depending upon where your firmware update code is running. It looks like the OSR Online Forum has a question of the same nature and assumes the same precedence (driver installation).
I'm using win7-64bit
I am in the process of developing a user interface for a USB CDC device (used as a flash programmer) I am adding in exception handlers and constantly testing, but whenever something does go wrong and the program crashes, the USB device disappears from device manager and will not reconnect. I uninstall and reinstall the driver (which I have made automatic in the c# GUI) but this doesn't fix it either. Nor does resetting the computer, changing USB ports, etc.. The only way I know to fix it is to delete the registry entries for the specific PID / VID stuff and then unplug the USB and plug it back in. Windows the reinstalls it (because it still has the inf file) and it works perfectly. This shouldn't be an issue in the release version, but for testing it has been a real problem constantly going through that process.
My question is why is this happening?
I want to disable/enable all usb ports at once.
I tried the following:
Changed the registry (with admin privileges):
//disable USB storage...
Microsoft.Win32.Registry.SetValue(#"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR", "Start", 4, Microsoft.Win32.RegistryValueKind.DWord);
//enable USB storage...
Microsoft.Win32.Registry.SetValue(#"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR", "Start", 3, Microsoft.Win32.RegistryValueKind.DWord);
I also tried Hardware Helper Library for C# - even not detecting the devices
and Win32 API function to programmatically enable/disable device
I am using windows 8.1 64bit if it matters, and I compile the code with platform target = any CPU if it matters again.
EDIT:
Still not working.
I want to block/disable all the usb devices then even connect in the future and not only the current.
Can anyone help me?
Would appreciate your help.
That registry key prevents the USBSTOR driver from loading. It won't unload it if it is already in use. So you will not see any effect until after reboot.
make USBSTOR value to 4 and restart the PC. Another way is to disable in BIOS. Most of the computer manufacturers support this. But it will disable not only storage but all.
I'm trying to write a program which will run when a Windows Mobile device is connected, according to Microsofts documentation to do that we have to:
If you want your RAPI application to automatically execute when a
Windows Mobile device connects to the desktop computer, do not put
your application in StartUp or allow it to autorun. Instead, register
it to be automatically run by ActiveSync upon device connection. For
more information, see MSDN.
How do I accomplish that?
Set a registry value at
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows CE Services\AutoStartOnConnect
source:
http://pocketnow.com/tweaks-hacks/how-to-automatically-start-a-pc-application-on-device-connect-disconnect