That’s why this is a perfectly valid script: Wscript.Echo “Hey.” Instead, the Wscript object is automatically created – and only created – when you run Windows Script Host (that is, Wscript.exe or Cscript.exe). This is a point that often creates confusion: because you can’t use certain commands – such as Wscript.Echo and Wscript.Sleep – within an HTA people assume you can’t use any WSH commands in an HTA.įirst things first: why can’t you use Wscript.Echo and Wscript.Sleep in an HTA? Well, those methods are properties of the Wscript object, and you can’t create an instance of the Wscript object. Before we do that, however, we should note that you actually can use the Wscript.Shell object within an HTA. Yes, we do know of an alternative to the Wscript.Shell command that will work in HTAs, and we’ll show you that in a minute. Hey, Scripting Guy! Is there an alternative to the Wscript.Shell command for HTAs? I need to run an application and specify the file to open.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |