WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Registry
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Registry Entry for WBTs and Multiple Parameters

Keywords:    Registry Entry for WBTs and Multiple Parameters

Question:

After installing WinBatch there is a Registry entry like
[HKEY_CLASSES_ROOT\WBT_auto_file\shell\open\command] 
@="D:\Programme\Programmierung\WinBatch\system\WinBatch.exe" "%1"
where %1 stands for the filename of the .wbt-script that will be interpreted by WinbBatch.exe .

I used to change this to

[HKEY_CLASSES_ROOT\WBT_auto_file\shell\open\command]
@="D:\Programme\Programmierung\WinBatch\system\WinBatch.exe" "%1" "%2" "%3" "%4" "%5" "%6" "%7" "%8" "%9"
in order to allow up to 8 additional parameters to be passed to the .wbt-script.

But every time I update WinBatch the multi-parameter-form is reduced to the one- parameter-form. I use Windows links - represented by icons - that contain links of the form

wbt-file param1 param2 param3 ...
If I doubleclick on such a link, Windows will look up the Registry to know what to do with a wbt-file. Then only the name of this wbt-file will be passed as a parameter "%1" to WinBatch.exe. My param1 param2 param3 are ommitted.

As soon as I edit the Registry as described below, things work fine.

Answer:

Well. I made a file:

if param0 != 0
   line=param1
   for xx=2 to param0
   line=strcat(line,@crlf,param%xx%)
   next
else
   Message(param0,"No parameters")
endif
then I edited the registry...
[HKEY_CLASSES_ROOT\WBT_auto_file\shell\open\command]
@="C:\Program Files\WinBatch\system\WinBatch.exe" "%1" "%2" "%3" "%4" "%5" "%6" "%7" "%8" "%9"
Then I made a shortcut to by test file above. Edited the target line to read....
"C:\Temp\ptest.wbt"  111 222 333
Sorry, none of those worked. I had to restore the registry to the original values.

I think we've been thru this before. It seems to always break something, or else we would have probably done it long ago.


Article ID:   W15680
File Created: 2003:05:13:11:29:30
Last Updated: 2003:05:13:11:29:30