Solved

PSEXEC - Errors executing a remote APP

Posted on 2003-11-20
9
1,388 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
  • 4
  • 3
9 Comments
 
LVL 37

Expert Comment

by:Bing CISM / CISSP
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:Bing CISM / CISSP
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
 

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
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: 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:Bing CISM / CISSP
ID: 9800417
nice to hear it works. good luck, bbao
0
 
LVL 37

Expert Comment

by:Bing CISM / CISSP
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

Network it in WD Red

There's an industry-leading WD Red drive for every compatible NAS system to help fulfill your data storage needs. With drives up to 8TB, WD Red offers a wide array of solutions for customers looking to build the biggest, best-performing NAS storage solution.  

Join & Write a Comment

Nslookup is a command line driven utility supplied as part of most Windows operating systems that can reveal information related to domain names and the Internet Protocol (IP) addresses associated with them. In simple terms, it is a tool that can …
This article is in response to a question (http://www.experts-exchange.com/Networking/Network_Management/Network_Analysis/Q_28230497.html) here at Experts Exchange. The Original Poster (OP) requires a utility that will accept a list of IP addresses …
This video discusses moving either the default database or any database to a new volume.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

760 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now