Solved

PSEXEC - Errors executing a remote APP

Posted on 2003-11-20
9
1,394 Views
Last Modified: 2013-12-23
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
Comment
Question by:karnso77
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
9 Comments
 
LVL 37

Expert Comment

by:bbao
ID: 9793494
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
 

Author Comment

by:karnso77
ID: 9793792
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
 
LVL 37

Expert Comment

by:bbao
ID: 9794337
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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 

Author Comment

by:karnso77
ID: 9799991
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
 

Author Comment

by:karnso77
ID: 9800342
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
 
LVL 37

Expert Comment

by:bbao
ID: 9800417
nice to hear it works. good luck, bbao
0
 
LVL 37

Expert Comment

by:bbao
ID: 9804985
oh, does it mean my contribution has no help to the question at all...
0
 
LVL 2

Accepted Solution

by:
Lunchy earned 0 total points
ID: 9821470
PAQed, with points refunded (250)

Lunchy
Friendly Neighbourhood Community Support Admin
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Trying to figure out group policy inheritance and which settings apply where can be a chore.  Here's a very simple summary I've written which might help.  Keep in mind, this is just a high-level conceptual overview where I try to avoid getting bogge…
An article on effective troubleshooting
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question