This question is a natural follow up to How to run a batch file without launching a "command window"?
One can associate for example .txt files with Wordpad by opening the Properties dialog of a txt file and pressing the Change button next to "Opens with..." and choosing Wordpad. If I do the same with a VBScript file (rather than Wordpad), that is, if I associate .txt files with the VBscript and try to open the associated file (the txt file), Windows shows a pop up saying
This app can't run on your PC ...
The full quote and the screenshot is exactly the same as one in this thread
I suspect this error message may be due to some kind of security feature of Windows 8 to prevent users from being tricked into running bad scripts, but the vbs script is created by myself on the same machine, and I wonder if there is a way say "I wrote this. You can trust this script." to Windows. The script runs fine if I run it directly (by double clicking or tapping on it), or if I drag and drop a txt file to the script.
.foofiles with my VBS script, and then try to open a.foofile, Windows 8 still says the same error message. – Jisang Yoo Feb 01 '14 at 20:21.txtand.foofiles with GNU Emacs in some special way. This requires associating the files with emacsclientw.exe in a way that some command line options are always passed to emacsclientw.exe. One way to achieve this is to create a batch file containing a line likepath\to\emacsclientw.exe --some-options %*and then associate foo files with the batch script. But now a little problem is that the batch file will launch a cmd window (which disappears within a second, so not a big problem). .. – Jisang Yoo Feb 01 '14 at 22:00