Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I want to have a batchfile set files with a certain extention to open with a certain program, then let the user choose to open one of various files in the same folder as the batchfile.
So I guessed at it and used this format:
@echo off
assoc .xxx=xxxfile
assoc .yyy=yyyfile
ftype xxxfile=[program1]
ftype yyyfile=[program2]
cls
echo 1: File1
echo 2: File2
echo.
set /p var=Load Which File?
echo.
if "%var%"=="1" (
call file1.xxx
)
if "%var%"=="2" (
call file2.yyy
)and so on....
When I run the batchfile, and select a file to load, it runs the associated program, but doesn't load the file.
If I go into File Options (in windows xp) manually, select the file extention, edit the "Open" option, and uncheck the box labeled "Use DDE" I can open the files correctly by double-clicking them, but when the batchfile creates the file extention associations it always ends up with the box checked again, and everything stops working.
Basically, I need to have the batchfile not enable (or disable) the "Use DDE" setting in the first place.
Thanks for any help

hmmm.
not sure i understood your question but i would recomment add somekind of registry file, and let the batchfile add it.There he goes. One of God's own prototypes. Some kind of high powered mutant never even considered for mass production. Too weird to live, and too rare to die

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |