![]() Our first thought was to remove the double quotes and then use the VBScript Split function to carve the command-line into an array. All we have to do now is figure out how to tease those values out of there. ![]() ![]() In other words, we can capture the command-line arguments as you can see, both arg1 and arg2 are in the value returned by the commandLine property. Guess what the commandLine property returns then? That’s right the entire command string, with the path surrounded by double quotes and the two arguments tacked onto the end: “c:\scripts\cmdline.hta” arg1 arg2 Now suppose you type something like this at the command prompt: c:\scripts\cmdline.hta arg1 arg2 Thus the commandLine is nothing more than the path to the HTA file, something like this (note that the double quotes are part of the value): “C:\Scripts\Cmdline.hta” ![]() Because HTAs are GUI tools, they are typically started simply by double-clicking the file icon in Windows Explorer or My Computer. The commandLine property simply reports back the command used to start an HTA. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |