0

I am testing via remote login (SSH) a simple VB script (thanks, Igor) from this thread ( Is it possible to download using the Windows command line? ) that just downloads a file to hard disk:

cscript MyScript.vbs

It works fine, but, as long as some programs do require to be executed from a started GUI session (that we have not at remote SSH), I wanna make a question:
Is there any general rule to know/guess/predict if a VBScript should work when remotely executed in text console, like SSH or Telnet?

Sopalajo de Arrierez
  • 6,603
  • 11
  • 63
  • 97
  • perhaps an amendment of your question.. asking what regex patterns would predict that a vbscript program was for GUI.. vs command line , that could then go on stackoverflow. Also, been a while but i'd note that Wscript.echo is either. Maybe one thing is if it takes parameters like looking for Wscript.Arguments But also you could check it manually, and put a marker in it that would prove it. And maybe some way of detecting if a window pops up! – barlop Feb 08 '14 at 16:23
  • Mmm.. maybe you are right. However, discussions about ways to execute programs remotely on remote console access have been developed at SuperUser. I think I will wait for a few days and read others comments, or see if many people "ups" your comment. If yes, I will delete it from here and move to StackOverFlow. – Sopalajo de Arrierez Feb 08 '14 at 17:01
  • I don't think you completely see what I meant. If you amended your question to give give a question that goes to the essence of the problem.. that'd be equivalent to what I said, and that means removing anything about executing programs remotely because it becomes not relevant. my suggestion was "asking what regex patterns would predict that a vbscript program was for GUI.. vs command line" That is the question I was/am suggesting to you. And if that isn't fit for SO 'cos it's too theoretical perhaps, then consider programmers.stackexchange – barlop Feb 08 '14 at 17:49
  • so tags would be regex and vbscript and command-line and nothing at all about ssh or remote execution in words or tags or anything. And if people ask you what you are actually asking and you tell them you're asking what you asked and clarify that if they don't get it! And you vote, comment and give attention to those that respect what you asked. – barlop Feb 08 '14 at 17:53
  • It is possible that I am not seeing completely what you mean. But let me pose the question this way: "Without deep analysis of the .vbs code, is there a fast way/test to know if a VBScrit needs for GUI?". Do you think this question should remain at this forum? Of course I can run the VBScript via both GUI and SSH, and see the difference, but isn't there something more informative, like any info at Windows Event Viewer or some ErrorCode like "echo %errorlevel%"? – Sopalajo de Arrierez Feb 09 '14 at 15:23
  • well, that would be a superuser question.. Another question that might do it, this for superuser, is is there a way you can see how many windows are open on the computer, preferably command line. Then you can see the number before running the code, and after, and if the number of windows increased. But if you were to ask, How in powershell do you output how many windows are open..(and mention nothing of why), then that could go on SO as even one line powershell things are accepted there. – barlop Feb 09 '14 at 16:30
  • bear in mind though, an imaginative idea you thought of, like "oh maybe there's some event triggered by a vbscript program".. or maybe there's some software out that does this.. Really if it doesn't get thrown up by google, it is probably very obscure, or non-existent, and people here won't know of it. But if you think about a technical way that it could be done, that isn't limited by something like software already out there. like windows or 3rd party tools out there that probably don't do it. But you're asking the technical question of how to do it, then you're more likely to get an answer – barlop Feb 09 '14 at 16:36
  • ideally a superuser question/answer would be what you want 'cos it'd be simple and work out of the box.But if google isn't throwing anything up, and it isn't something people tend to do, then you're not likely to be lucky enough to get a superuser type answer. But bear in mind, even if ther was a log,an automated program is going to have to read the log.So even if what you imagined happens,that might still not be an out of the box solution and may still need some coding.And you can always ask the different questions on SU and SO.The SO question just happening to possibly suit the SU question. – barlop Feb 09 '14 at 16:38

0 Answers0