• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1405
  • Last Modified:

PSEXEC - Errors executing a remote APP

Hi,
I have been trying to use psexec to excute an VC++ app remotely.
This is my scenario:
On the remote PC, i have a bat file, called startme.BAT,  that contains commands:
pskill StartApplication.exe
.
.
start /b D:\.....\StartApplication.exe

Now, if i run this BAT file, on the server itself, WinNT 4.0 SP6, then the BAT File functions normally by restarting the Application.

The problem starts when I try to execute startme.BAT from a remote workstation.

This is how i am executing it:
psexec \\computername -u domainAdmin -p domainPassword -i D:\..\startme.bat

Where DomainAdmin is a part of the local Admin group on the remote server.

The Bat file executes fine till the point where it has to restart the Application. I get a VC++ runtime error and the thing quits ???

Any help would be helpful.

Thanks.
0
karnso77
Asked:
karnso77
  • 4
  • 3
1 Solution
 
bbaoIT ConsultantCommented:
whats the vc++ runtime error? please give a exact message with error id.

btw, how are the remote workstation and the server connected? any firewall between them? are the two hosts netbios enabled?
0
 
karnso77Author Commented:
I just get a VC++ Runtime Error Popup Box.

All it says is :
Program Termination:
Program: Name of program
Abnormal program termination

I cannot execute the BAT file from any workstation / server on the network. This includes trying to execute the BAT file from a machine on the same subnet to across networks. the hosts have netbios enabled.
Another funny thing.....
I changed startme.bat, on the server, replacing the start /b .. command with:
psexec \\local machine name -u DomainAdmin -p DomainPass -i StartApplication.exe

I got an error: Access Denied...cannot install the psexec service

The DomainAdmin password is a member of the local admin group ....

0
 
bbaoIT ConsultantCommented:
o? cannot install the psexec service? it is a service?
if so, what happens if you run psexec to invoke locall application on the workstation?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
karnso77Author Commented:
the "cannot install psexec service" resulted as a result of trying to start another psexec session on the server..ie using psexec on the workstation, i executed a BAT file on the server that had another psexec command in it. I guess that was stupid but it did not solve the problem.
I tried another thing, instead of the BAT file i created a VB exe that calls the application by using the WinExec API.
It did not work too and i got a return code, from WinExec, of 33.

Does anyone know what that means ?
0
 
karnso77Author Commented:
bbao,
Thanks for all your help but I figured out how to make it work.
Instead of using the -u ... -p ... option, i used -s and it works under the Systesm Account.
I am closing the question and thanks once again.
0
 
bbaoIT ConsultantCommented:
nice to hear it works. good luck, bbao
0
 
bbaoIT ConsultantCommented:
oh, does it mean my contribution has no help to the question at all...
0
 
LunchyCommented:
PAQed, with points refunded (250)

Lunchy
Friendly Neighbourhood Community Support Admin
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now