Remote execution of application interactively Win 7

Questions and information about using VBScript and JavaScript in NeoBook functions

Moderator: Neosoft Support

Locked
As1401
Posts: 2
Joined: Mon Mar 03, 2008 1:09 pm

Remote execution of application interactively Win 7

Post by As1401 »

Hi Neosoft,

I have a function that allowed the remote execution of an app with the current logged on user.
Worked fine in XP, however because of the additional security in Win 7, runs hidden. It is a countdown screen that countdowns from 2.0 minutes, then auto reboots that system. It also has a "Abort reboot" button that the user can press if they are doing work.

Function is:

strComputer = "[%1]"
strCommand = """c:\Program Files (x86)\EWR\EWR_Client.exe"""

Const INTERVAL = "n"
Const MINUTES = 1

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set objScheduledJob = objWMIService.Get("Win32_ScheduledJob")
Set objSWbemDateTime = CreateObject("WbemScripting.SWbemDateTime")

objSWbemDateTime.SetVarDate(DateAdd(INTERVAL, MINUTES, Now()))
errReturn = objScheduledJob.Create(strCommand, objSWbemDateTime.Value, False, 0, 0, True, intJobID)

If errReturn = 0 Then
'Wscript.Echo "notepad.exe was started with a process ID: " & intJobID
Else
'Wscript.Echo "notepad.exe could not be started due to error: " & errReturn
End If


This basically sets up an AT job on the remote PC to run in 1 minute. It does'nt run interactively in Win 7.
I have tried using Schtasks as well, but that doesn't work interactively.Starts it's own session.

Is there a way around this?

Kind regards,

Alan Soper
Neosoft Support
NeoSoft Team
Posts: 5628
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA
Contact:

Re: Remote execution of application interactively Win 7

Post by Neosoft Support »

I'm sorry, I don't have an answer for you. You might be able to tweak the Windows 7 security policy to allow your program to work.

This Google search may help:

https://www.google.com/webhp?sourceid=c ... w%20reboot
NeoSoft Support
As1401
Posts: 2
Joined: Mon Mar 03, 2008 1:09 pm

Re: Remote execution of application interactively Win 7

Post by As1401 »

Hi Neosoft,

Searched high and low for an answer. Didn't want to use PSEXEC.
Finally came up with a workable solution, which runs great. :D

Eltima's "Application as Service", http://www.eltima.com.

Install new service to remote PC or build image. Configure service to be manual and run interactively.
Then can send a SC command in hidden dos prompt window from controlling PC like so "SC remotePC start myservice", pops up the executable interactively. :lol:
Worth the money as an investment!!

Thought I'd share this with the other users who may need to do the same thing.

kind regards,

Alan S
Neosoft Support
NeoSoft Team
Posts: 5628
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA
Contact:

Re: Remote execution of application interactively Win 7

Post by Neosoft Support »

I'm glad you found a solution. Thank you for sharing it with us.
NeoSoft Support
Locked