# Using DOS Start command



## Davey7549 (Feb 28, 2001)

This is more out of curiosity than need but here is what I am playing with. The start command if placed in a Bat file has the ability to have several start lines that will run asynchronously. This concept I would like to apply replacing the contents of the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run which runs synchronously with a Bat file containing the same calls using start. I played with the concept for awhile today and was able to get many of the contents of the run key to start using a bat file but some erred saying could not find parameters or associated commands.

Here is what the run key looks like:
"iamapp"="C:\\Program Files\\Norton Internet Security\\IAMAPP.EXE"
"Disc Detector"="C:\\Program Files\\Creative\\ShareDLL\\CtNotify.exe"
"HPHA1MON"="C:\\WINDOWS\\SYSTEM\\HPHA1MON.EXE"
"Tweak UI"="RUNDLL32.EXE TWEAKUI.CPL,TweakMeUp"
"ScanRegistry"="C:\\WINDOWS\\scanregw.exe /autorun"
"PCHealth"="C:\\WINDOWS\\PCHealth\\Support\\PCHSchd.exe -s"
"SystemTray"="SysTray.Exe"
"NPROTECT"="C:\\Program Files\\Norton Utilities\\NPROTECT.EXE"
"Matrox Powerdesk"="C:\\WINDOWS\\SYSTEM\\PDesk.exe /Autolaunch"
"hpppta"="C:\\Program Files\\Hewlett-Packard\\HP PrecisionScan\\PrecisionScan Pro\\hpppta.exe /ICON"
"NAV Agent"="C:\\PROGRA~1\\NORTON~2\\NAVAPW32.EXE"

And this is how I created the Bat file entries:

Start "C:\\WINDOWS\\scanregw.exe /autorun"
Start "C:\\Windows\\System\\SysTray.Exe"
Start "C:\\Progra~1\\Norton~2\\NAVAPW32.EXE"
Start "C:\\Progra~1\\Norton~2\\IAMAPP.EXE"
Start "C:\\Progra~1\\Norton~2\\NPROTECT.EXE"
Start "C:\\WINDOWS\\PCHealth\\Support\\PCHSchd.exe -s"
Start "C:\\WINDOWS\\SYSTEM\\HPHA1MON.EXE"
Start "C:\\Progra~1\\Hewlet~1\\HP Pro~1\\Precis~2\\hpppta.exe /ICON"
Start "C:\\Windows\\RUNDLL32.EXE TWEAKUI.CPL"
Start "C:\\Progra~1\\Creative\\ShareDLL\\CtNotify.exe"
Start "C:\\WINDOWS\\SYSTEM\\PDesk.exe /Autolaunch"

Anyone have any ideas if this concept would even work and if so using the above items how would they be structured.

Again this is out of curiosity more so than need since my system is not displaying any startup conflicts.

Dave


----------



## MacFromOK (Mar 19, 2001)

_______________________________________________

Hey Davey, 

I'm curious as to which ones didn't work...

One thing ya might try - don't include the parameters
in the quotes. Example:

"C:\whatever\PrecisionScan Pro\hpppta.exe" /ICON 

Also, I don't think most with "=" will work properly.
Windows expects a key to hold that value (INI files
are also used for key values). 

Cheers, Mac


----------



## Davey7549 (Feb 28, 2001)

Mac

Will play again tomorrow and see what I can come up with!

I thought enclosing in Quotes would accept spaces during parsing.

Dave


----------



## MacFromOK (Mar 19, 2001)

_____________________________________________
It does accept spaces, but everything in quotes
can be treated as a single command argument.
Some programs may not separate the parameter
(the second argument) as needed. 

Cheers, Mac


----------



## Davey7549 (Feb 28, 2001)

Mac

Here is what I did and the results:
1) Created and placed Run.bat in root of C:
2) Exported registry Key Run
3) Deleted all existing entries under the Run Key
4) Created String entry RunBat "C:\\Run.bat"
5) Restarted computer
6) Upon sign in Bat file ran as expected

Results:
1) Dos Window opened
2) All entries ran in sequence Asynchronously
3) Three entries showed error two of which actually started one did not
4) Three Entries Created a new line entry in the Run Key to replace the deleted one
5) Manually closed DOS Window

Below are the items which generated message
Green...Started but Created Line entry in Run Key
Red......Did not start
Blue.....Started but created error Message and Created Line entry in Run Key

Start C:\\WINDOWS\\scanregw.exe /autorun 
Start C:\\Windows\\System\\SysTray.Exe 
Start C:\\Progra~1\\Norton~2\\NAVAPW32.EXE 
Start C:\\Progra~1\\Norton~2\\IAMAPP.EXE
Start C:\\Progra~1\\Norton~2\\NPROTECT.EXE
Start C:\\WINDOWS\\PCHealth\\Support\\PCHSchd.exe -s 
Start C:\\WINDOWS\\SYSTEM\\HPHA1MON.EXE 
Start C:\\Progra~1\\Hewlet~1\\HP Pro~1\\Precis~2\\hpppta.exe /ICON 
Start C:\\Windows\\RUNDLL32.EXE TWEAKUI.CPL 
Start C:\\Progra~1\\Creative\\ShareDLL\\CtNotify.exe
Start C:\\WINDOWS\\SYSTEM\\PDesk.exe /Autolaunch

Problem Conclusions
1) The items that started but created line entries in the Run Key probably have switches in the program options area to disable at start.
2) Items that errored but did start have parameters outside of DOS or are reflecting the creation of the Reg Entry
3) Not sure why the hpppta.exe did not start

Use for such a setup?
If an individual has a need due to a conflict in startup to force a certian sequence and have one task complete before another starts using this method will work.

Dave


----------



## walltree (Jan 27, 2003)

I noticed you had one line in your message containing HP PrecisionScan Pro and it had a parameter of /ICON. I have been searching for the last couple of days for a list (if there is one) of parameters pertaining to HP PrecisionScan Pro, but have not been able to find one. If you know of one, I would greatly appreciate your help. Thanks.

walltree


----------



## Davey7549 (Feb 28, 2001)

walltree

No I also looked for a parameter list for Hpppta.exe and found none. HP of course shows nothing in that regard. If I do come across one I will post it here for you.

Dave


----------



## Rockn (Jul 29, 2001)

If you are running Wn2K or XP go into the services and check the properties there. Sometimes they list what startup switches the application is using. You could also go to the command prompt and type in hpppta.exe /? sometimes they build in a help file when they compile the executable. What is the reason for the experiment?


----------

