M
McBob
Shorter version of question: I want to be able to take a plain ol'
batch file (something.bat) and change the extension (something.foo),
and still have it run like a batch file. I've tried the following app
associations for .foo:
cmd.exe "%1"
command.com "%1"
cmd.exe < "%1"
command.com < "%1"
"%1" %*
The first four simply open a command prompt but don't parse the batch
file, and the last one gives me the "something.foo is not a valid
Win32 application" error. I've also tried making .foo of type batfile,
using the following registry entry:
[HKEY_CLASSES_ROOT\.yoo]
@="batfile"
This also gives the invalid Win32 app error. When I rename it back to
..bat, there are no problems. What must I do to get this to work?
Longer version of question: I want to change some things in the
registry when a client machine clicks a link on a webpage. Batch files
are the easiest way to do this, but then you get the 'Open or Save?'
dialog, which I want to avoid. Since you can't disable this for batch
files (and it would be a terrible thing to do anyway), I figure I can
have a different extension that functions as a batch file, but allows
to use the "Always do this action" checkbox. I can then set the client
machines in advance so that that checkbox is already ticked, and when
they eventually go the page and click the link to something.foo, it
will run automaticly and alter the registry. I can't seem to think of
any other way to accomplish this goal, except for using an ActiveX
control to launch the batch file. But I don't have very good
programming skills, and the only pre-made control I know of
(IntraLaunch by Particle Software) costs money, so I'd like to find
another way. Other than my renamed-batch-file solution, how could I
accomplish this?
Thank you very much!
batch file (something.bat) and change the extension (something.foo),
and still have it run like a batch file. I've tried the following app
associations for .foo:
cmd.exe "%1"
command.com "%1"
cmd.exe < "%1"
command.com < "%1"
"%1" %*
The first four simply open a command prompt but don't parse the batch
file, and the last one gives me the "something.foo is not a valid
Win32 application" error. I've also tried making .foo of type batfile,
using the following registry entry:
[HKEY_CLASSES_ROOT\.yoo]
@="batfile"
This also gives the invalid Win32 app error. When I rename it back to
..bat, there are no problems. What must I do to get this to work?
Longer version of question: I want to change some things in the
registry when a client machine clicks a link on a webpage. Batch files
are the easiest way to do this, but then you get the 'Open or Save?'
dialog, which I want to avoid. Since you can't disable this for batch
files (and it would be a terrible thing to do anyway), I figure I can
have a different extension that functions as a batch file, but allows
to use the "Always do this action" checkbox. I can then set the client
machines in advance so that that checkbox is already ticked, and when
they eventually go the page and click the link to something.foo, it
will run automaticly and alter the registry. I can't seem to think of
any other way to accomplish this goal, except for using an ActiveX
control to launch the batch file. But I don't have very good
programming skills, and the only pre-made control I know of
(IntraLaunch by Particle Software) costs money, so I'd like to find
another way. Other than my renamed-batch-file solution, how could I
accomplish this?
Thank you very much!