Source language: Translate to:

Remote execution of application interactively Win 7

Questions and information about using VBScript and JavaScript in NeoBook functions

Moderator: Neosoft Support

Remote execution of application interactively Win 7

Postby As1401 » Sat Jan 24, 2015 5:18 pm

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
As1401
 
Posts: 2
Joined: Mon Mar 03, 2008 1:09 pm

Re: Remote execution of application interactively Win 7

Postby Neosoft Support » Mon Jan 26, 2015 11:24 am

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=chrome-instant&ion=1&espv=2&ie=UTF-8#q=windows%207%20security%20poilicy%20allow%20reboot
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: Remote execution of application interactively Win 7

Postby As1401 » Mon Feb 02, 2015 4:44 pm

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
As1401
 
Posts: 2
Joined: Mon Mar 03, 2008 1:09 pm

Re: Remote execution of application interactively Win 7

Postby Neosoft Support » Tue Feb 03, 2015 11:42 am

I'm glad you found a solution. Thank you for sharing it with us.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA


Return to NeoBook Functions - VBScript & JavaScript

Who is online

Users browsing this forum: No registered users and 1 guest

cron