Do you need to take control of the AutoRun feature? This sample illustrates how to AutoRun a batch file, so you can automatically start one or more executables, pass arguments to your executables, and more. This sample simply executes a windows command prompt, which then processes commands in a batch file. So, if you can do it in a batch file, you can do it at start up.
* This technique leverages the Process class to start a windows command prompt (cmd.exe) and execute a batch file - http://msdn.microsoft.com/en-us/library ... .90%29.asp.
* C# and VB.Net Projects are attached. Although these projects were made for the CUWIN 5000/6000 series, I believe the same code can be used for the CUWIN 3000/4000 series.
To Use:
1. Compile and Copy BatchAutoRun.exe to the "/Flash Disk/AutoRun" folder. It must be the only executable in that folder. You can have other executables in subfolders.
2. Be sure to set the dipswitch on the right-side of the CUWIN to 1 ON, 2 ON, the rest OFF to enable AutoRun mode
3. Create a text file called BatchAutoRun.bat in the same folder, and add whatever commands you wish. To start a program, add a line like this
Start "<Path To My Program.exe>" arg1 arg2 etc..
For more about Start see http://technet.microsoft.com/en-us/libr ... 10%29.aspx
4. The CUWIN will execute BatchAutoRun.exe, which will execute cmd.exe, which will process BatchAutoRun.bat, which will execute whatever you entered in BatchAutoRun.bat.