1 Reply Latest reply on Apr 22, 2015 2:04 AM by KeerthyV_76

    68013A: how to modify the script file path in CyUSB3.INF



        I used cy7c68013a to develope my product, and enabled its' CyScript feature to Execute a script at start-up, and i modify my driver's inf file according to the Modifying CyUSB3.INF chapter of CyUsb3.pdf:




        the sentence above is the last line of the inf file, it defined the spt file path to excute when start-up, I wonder how to modify the path to my user's path?


       I have tried to modify the path by edit the key value of DriverEXESCRIPT in regedit, such as: C:\MyDevice\Mydevice.spt  or


      \userprofile\MyDevice\MyDevice.spt, but all failed. only when I used the systemroot variable, the spt file excuted when start-up (I have already copy the spt file to the path defined in regedit ).


        so, how to modify the path as I want?


        thank you!

        • 1. Re: 68013A: how to modify the script file path in CyUSB3.INF





          Kernel-mode device drivers refer to a flat or a script file by its object name. This name is \DosDevices together with the full path of the file. For example, the object name of the C:\Windows\Example.txt file is \DosDevices\C:\Windows\Example.txt.





          On a cold boot or from system hibernation, all the kernel mode drivers will start running before file system is up & running. So, kernel mode driver will have access to %systemroot% and the subfolders underneath it and not all the system file system.





          Once the system completes booting, kernel mode driver will have access to all the file system resources through "DOSDEVICE" namespace.





          Suppose you have connected FX3 while the system is booting up. The CYUSB3 driver will try to access the .spt file. If the script file is stored in some other directory other than system root & its sub folders, the file may not be accessible to the driver. So it will fail in loading the script.







          Cypress won't recommend any of the cypress customers to change the path of the script file to non %systemroot% subfolders.




          Please refer the following link for details: