 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
BoBo Guest
|
Posted: Mon Jan 24, 2005 1:06 pm Post subject: StartX - Call the CreateProcess API [CMD] |
|
|
| Quote: | StartX, a very simple utility to allow you to call the CreateProcess API from the command line.
Places where you might find StartX useful are in adding an Autorun.inf file to your CD-R / CD-RW Discs. For example suppose you have a text file called readme.txt on the root of your CD which you would like to run it automatically by displaying it in Wordpad maximized whenever the user inserts the CD. All you need to do is put StartX.exe, some ico file and the readme.txt files into the root directory and create a autorun.inf file with the following contents:
[autorun]
open=StartX.exe /MAX "wordpad.exe readme.txt"
icon=youricon.ico
The more technically minded of you may say why is there a need to have this program since you can use "start filename" on autorun CD's without any apparent problems. The problem with this approach is that it does not work on NT / 2000 / XP / 2003 Server, "start" is implemented as an "Internal" command in cmd.exe ( as opposed to a standard exe on 95/98 ) with the upshot that your CD's will not autorun on NT Kernels. Using StartX will mean that your CD's will autorun on all OS's which support it.
StartX includes a full superset of the commands which the Windows 2000 / XP internal Start command provides. The full list is:
StartX ["title"] [/Dpath] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED] [/PP] [/Uuser] [/Wpassword] [/Odomain] [/K[desktop]] [/Px,y] [/Scx1,cy1] [/CScx2,cy2] [/FR] [/FG] [/FB] [/BR] [/BG] [/BB] [/FS] [/LP] [/LNCO] [/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL] [/WAIT] [/B] [/NOUI] [/RETURNERROR] ["command/program parameters"]
[Download] |
|
|
| Back to top |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 3004 Location: Minnesota
|
Posted: Mon Jan 24, 2005 3:57 pm Post subject: |
|
|
You forgot StartX's cousin - ShelExec:
| Quote: | ShelExec v1.14 A freeware application + source code to call the ShellExecute API
Welcome to ShelExec, A very simple utility to allow you to call the ShellExecute API from the command line.
Places where you might find ShelExec useful are in adding an Autorun.inf file to your CD-R / CD-RW Discs. For example suppose you have a HTML page called index.htm on the root of your CD which you would like to run automatically whenever the user inserts the CD. All you need to do is put ShelExec.exe, some ico file and the index.htm files into the root directory and create a autorun.inf file with the following contents:
[autorun]
open=ShelExec.exe index.html
icon=youricon.ico
Items that ShelExec can handle include any file which is registered with the shell e.g. Word .Doc files, Text Files, batch files etc etc. It can also handle URLs such as "http://somesite.com", "ftp://www.microsoft.com" and "mailto:somebody@somedomain.com".
The more technically minded of you may say why is there a need to have this program since you can use "start filename" on autorun CD's without any apparent problems. The problem with this approach is that it does not work on NT because on NT "start" is implemented as an "Internal" command in cmd.exe (as opposed to a standard exe on 95/9 with the upshot that your CD's will not AutoRun on NT 4 or Windows 2000. Using ShelExec will mean that your CD's will autorun on all OS's which support it.
The enclosed zip file contains the ShelExec source code and a prebuilt version of ShelExec.
Homepage
Download |
|
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|