Solved

PSEXEC - Errors executing a remote APP

Posted on 2003-11-20
9
1,392 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Greetings, Experts! First let me state that this website is top notch. I thoroughly enjoy the community that is shared here; those seeking help and those willing to sacrifice their time to help. It is fantastic. I am writing this article at th…
The Need In an Active Directory enviroment, the PDC emulator provide time synchronization for the domain. This is important since Active Directory uses Kerberos for authentication.  By default, if the time difference between systems is off by more …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

763 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