I have a virtual machine on which I want to run an automatic task (i.e. an automatic task runs on a virtual machine).
VM is a Windows 2008 server.
I added a task to the task scheduler, and when I enter the machine through RDP, I can start the task by right-clicking Run.
However, when my RDP session is turned off (but the user on the VM is still registered), the task tries to complete, but only opens notepad.exe, but does not write the text.
Vbs script is as follows (simplified for our use here ...);
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run "Notepad.exe"
Do Until Success = True
Success = objShell.AppActivate("Notepad")
Wscript.Sleep 1000
Loop
objShell.SendKeys "This is a test."
I have this task that works fine on a computer running Windows XP, and I just can't figure out what causes the problem.
, , RDP. RDP MSTSC VM .
,