Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Remote start application

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,3274
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Remote start application
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Remote start application - 6/7/2005 9:12:43 AM   
  drh

 

Posts: 6
Score: 0
Joined: 5/31/2005
From:
Status: offline
I'm trying to automate a backup routine and I must perform certain tasks, in sequential order. One of these is to shut down a FoxPro database, which resides on another machine, perform B/U then restart the FP db.

I'm using the Windows scheduler on a server to start a vbs. Here is the code I'm trying to use.

Dim Controller, RemoteScript
Set Controller = WScript.CreateObject("WSHController")
Set RemoteScript = Controller.CreateScript("I:\AdminScripts\StartNote.vbs", "Report")
WScript.ConnectObject RemoteScript, "remote_"
RemoteScript.Execute

Do While RemoteScript.Status <> 2
WScript.Sleep 100
Loop

WScript.DisconnectObject RemoteScript

Sub remote_Error
Dim theError
Set theError = RemoteScript.Error
WScript.Echo "Error " & theError.Number & " - Line: " & theError.Line & ", Char: " & theError.Character & vbCrLf &

"Description: " & theError.Description
WScript.Quit -1
End Sub

And here is the script it is calling. (I:\AdminScripts\StartNote.vbs)

Dim objShell

Set objShell = CreateObject("Wscript.Shell")
objShell.Run "C:\WinNt\NotePad.exe", 3, False

I want the script to launch the remote application in a visible mode. That is why I am using a parameter 3, Window Maximized. What I am getting is the application running as a process only, no GUI. If I go to the machine where the remote application is and run the local script it functions as it should, window maximized.

What am I missing? I figure, if I can get NotePad to work, I can get my FoxPro app to work as well.

I've also tried to use SysInternals PSExec to launch my FP app but the remote computer returns a message that a dll is corrupt or missing. I think using WHSController is going to be my best option, if I can get it to work.

Any ideas?

Thanks
drh
 
 
Post #: 1
 
 Re: Remote start application - 6/15/2005 8:37:58 AM   
  DragonMasterXX5

 

Posts: 52
Score: 0
Joined: 6/13/2005
From: USA
Status: offline
got me there man

(in reply to drh)
 
 
Post #: 2
 
 Re: Remote start application - 6/16/2005 10:47:06 AM   
  drh

 

Posts: 6
Score: 0
Joined: 5/31/2005
From:
Status: offline
I still do not have this resolved and I'm still open to any ideas.

drh

(in reply to drh)
 
 
Post #: 3
 
 Re: Remote start application - 6/16/2005 12:43:22 PM   
  netmarcos

 

Posts: 55
Score: 0
Joined: 12/7/2004
From: USA
Status: offline
Check user name/profile. Scheduled tasks or AT commands need to be running with the same creds as the current user for them to be visible on the user's desktop. Just a thought...

(in reply to drh)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Remote start application Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts