zoukankan      html  css  js  c++  java
  • 让ARM开发板上SD卡里的程序开机自动运行

    1:如果是arm处理器,在SD卡里建立一个名为2577的文件夹,将你的程序命名为autorun.exe放到这个文件夹里,插入SD卡程序就会自动运行

    2:在注册表下,把启动文件路径加上即可“\\PATH\\MY.exe”

    3:

    SDK Documentation for Windows Mobile-Based Pocket PCs
    Managing Applications on Storage Cards with Autorun.exe

    The autorun.exe utility that ships with the Windows Mobile SDK enables Windows Mobile software to detect a storage card that has been inserted into a mobile device and to automatically load a specified application from the storage card into active memory. This utility also enables Windows Mobile software to detect removal of the storage card and instructs the application to perform cleanup and to remove itself from active memory.

    To take advantage of this tool, add the following directory structure and files to a storage card:

    Root\...\2577\autorun.exe

    When a user inserts a storage card, the Windows Mobile-based device software searches the root directory of the card for a directory with the same name as the processor for that device. On Windows Mobile 2002 and later software for Pocket PCs, which are ARM based, this directory is always named 2577 — the processor type for ARM. The software then searches this directory for the autorun.exe file and loads this file to the \Windows directory in main memory on the device. Finally, the shell invokes the copy of autorun.exe on the device by using the install parameter. When the user removes the card, the shell invokes autorun.exe by using the uninstall parameter. The software also detects whether a card is inserted, removed, or swapped while power is off and takes appropriate action as soon as the device is turned on.

    For example, a game developer can store game binaries and data files on a storage card. The developer can then design an autorun.exe file that adds registry settings and loads necessary files when the storage card is inserted into the device and removes these settings and files when the card is removed.

    In an enterprise application, autorun.exe could be used to deploy a custom software application and data to a large number of devices. Updates to the application could be distributed to remote employees on inexpensive, low-capacity storage cards that perform automatic and trouble-free installation when inserted into the devices. If users must cold boot or replace their devices, they can simply insert the storage card that contains the application and data.

    Programmers can determine the source directory for the autorun.exe file by using the SHGetAutoRunPath function. A storage card must be inserted for this function to succeed, although autorun.exe does not need to be present on the storage card.

  • 相关阅读:
    四则运算出题系统,java
    Javaweb测试
    《构建之法》 读书笔记(6)
    使用ProcDump在程序没有响应时自动收集dump
    NASA关于如何写出安全代码的10条军规
    C#和C++中的float类型
    避免在C#中使用析构函数Finalizer
    C#性能优化的一些技巧
    从bug中学习怎么写代码
    Code Smell那么多,应该先改哪一个?
  • 原文地址:https://www.cnblogs.com/buffer/p/1434713.html
Copyright © 2011-2022 走看看