Jump to content

RUNAS ERROR: 87: The parameter is incorrect.


Recommended Posts

Guest Docfxit
Posted

I'm trying to run:

%comspec% /K runas /user:scans "ScanFiles.exe"

 

When I run this within the current user (ATU4)

it runs fine. When I run it from a different

computer with a Remote Procedure Call I get an

error SAYING:

Enter the password for scans:

Attempting to start ScanFiles.exe as user "ATUUSER4\scans" ...

RUNAS ERROR: Unable to run - ScanFiles.exe

87: The parameter is incorrect.

 

When I look at Security for Scanfiles.exe it

shows for ATUUSER4\Scans that it has Read

and Execute rights.

 

 

I have tried changing the user to

administrator with the administrator password and it

produced the same error.

 

Then I signed on as administrator and ran with

/user:administrator it produced the same error.

Process Explorer shows CMD.exe running with the user

NT Authority\System.

I expected it to be running with the user

ATUUSER4\Administrator.

 

I don't see what would stop your program from doing what

it is intended to do.

 

I'm running this in XP Pro sp2 NTFS "Use Simple File Sharing" is not checked.

 

Thank you,

 

Docfxit

  • Replies 6
  • Created
  • Last Reply
Guest Pegasus \(MVP\)
Posted

Re: RUNAS ERROR: 87: The parameter is incorrect.

 

 

"Docfxit" <Docfxit@discussions.microsoft.com> wrote in message

news:DEDA74A6-B142-4283-AF00-1BE56B8409D7@microsoft.com...

> I'm trying to run:

> %comspec% /K runas /user:scans "ScanFiles.exe"

>

> When I run this within the current user (ATU4)

> it runs fine. When I run it from a different

> computer with a Remote Procedure Call I get an

> error SAYING:

> Enter the password for scans:

> Attempting to start ScanFiles.exe as user "ATUUSER4\scans" ...

> RUNAS ERROR: Unable to run - ScanFiles.exe

> 87: The parameter is incorrect.

>

> When I look at Security for Scanfiles.exe it

> shows for ATUUSER4\Scans that it has Read

> and Execute rights.

>

>

> I have tried changing the user to

> administrator with the administrator password and it

> produced the same error.

>

> Then I signed on as administrator and ran with

> /user:administrator it produced the same error.

> Process Explorer shows CMD.exe running with the user

> NT Authority\System.

> I expected it to be running with the user

> ATUUSER4\Administrator.

>

> I don't see what would stop your program from doing what

> it is intended to do.

>

> I'm running this in XP Pro sp2 NTFS "Use Simple File Sharing" is not

> checked.

>

> Thank you,

>

> Docfxit

>

 

Could you explain what exactly you mean with this statement?

"When I run it from a different computer with a Remote Procedure Call"

Guest Docfxit
Posted

Re: RUNAS ERROR: 87: The parameter is incorrect.

 

 

 

"Pegasus (MVP)" wrote:

>

> "Docfxit" <Docfxit@discussions.microsoft.com> wrote in message

> news:DEDA74A6-B142-4283-AF00-1BE56B8409D7@microsoft.com...

> > I'm trying to run:

> > %comspec% /K runas /user:scans "ScanFiles.exe"

> >

> > When I run this within the current user (ATU4)

> > it runs fine. When I run it from a different

> > computer with a Remote Procedure Call I get an

> > error SAYING:

> > Enter the password for scans:

> > Attempting to start ScanFiles.exe as user "ATUUSER4\scans" ...

> > RUNAS ERROR: Unable to run - ScanFiles.exe

> > 87: The parameter is incorrect.

> >

> > When I look at Security for Scanfiles.exe it

> > shows for ATUUSER4\Scans that it has Read

> > and Execute rights.

> >

> >

> > I have tried changing the user to

> > administrator with the administrator password and it

> > produced the same error.

> >

> > Then I signed on as administrator and ran with

> > /user:administrator it produced the same error.

> > Process Explorer shows CMD.exe running with the user

> > NT Authority\System.

> > I expected it to be running with the user

> > ATUUSER4\Administrator.

> >

> > I don't see what would stop your program from doing what

> > it is intended to do.

> >

> > I'm running this in XP Pro sp2 NTFS "Use Simple File Sharing" is not

> > checked.

> >

> > Thank you,

> >

> > Docfxit

> >

>

> Could you explain what exactly you mean with this statement?

> "When I run it from a different computer with a Remote Procedure Call"

 

You can read a little about a Remote Procedure Call at

http://searchsoa.techtarget.com/sDefinition/0,,sid26_gci214272,00.html

Or you can Google it.

 

It's very simple. The command that Is used and works on a '98 PC is:

RUNRMTCMD CMD('C:\Batch\Scan.bat') RMTLOCNAME('192.168.1.4' *IP)

RMTUSER('SCANS') RMTPWD(password)

 

What is supposed to happen is the remote computer runs that command with the

IP address pointing to the computer I am running. It requests

the program C:\Batch\Scan.bat. It requests that it use the user SCANS on

this computer and it supplies a password for the user SCANS.

 

The there is a service on the local computer that runs RUNRMTCMD. In the

setup of the service it has LOGON as Local system account, Allow service to

interact with desktop.

 

I don't know if you can reproduce it but you might be able to figure out why

it appears to run under the user NT Authority\System instead of SCANS and or

how I can give it the proper authority to run under NT Authority\System.

 

If I can get the RUNAS command to run the program ScanFiles.exe I'm hoping

it will map the drive and run the program.

 

Thank you,

 

Docfxit

Guest Pegasus \(MVP\)
Posted

Re: RUNAS ERROR: 87: The parameter is incorrect.

 

 

"Docfxit" <Docfxit@discussions.microsoft.com> wrote in message

news:5205F6D2-356F-4DAD-B96C-6CDD4A4B1B07@microsoft.com...

>

>

> "Pegasus (MVP)" wrote:

>

>>

>> "Docfxit" <Docfxit@discussions.microsoft.com> wrote in message

>> news:DEDA74A6-B142-4283-AF00-1BE56B8409D7@microsoft.com...

>> > I'm trying to run:

>> > %comspec% /K runas /user:scans "ScanFiles.exe"

>> >

>> > When I run this within the current user (ATU4)

>> > it runs fine. When I run it from a different

>> > computer with a Remote Procedure Call I get an

>> > error SAYING:

>> > Enter the password for scans:

>> > Attempting to start ScanFiles.exe as user "ATUUSER4\scans" ...

>> > RUNAS ERROR: Unable to run - ScanFiles.exe

>> > 87: The parameter is incorrect.

>> >

>> > When I look at Security for Scanfiles.exe it

>> > shows for ATUUSER4\Scans that it has Read

>> > and Execute rights.

>> >

>> >

>> > I have tried changing the user to

>> > administrator with the administrator password and it

>> > produced the same error.

>> >

>> > Then I signed on as administrator and ran with

>> > /user:administrator it produced the same error.

>> > Process Explorer shows CMD.exe running with the user

>> > NT Authority\System.

>> > I expected it to be running with the user

>> > ATUUSER4\Administrator.

>> >

>> > I don't see what would stop your program from doing what

>> > it is intended to do.

>> >

>> > I'm running this in XP Pro sp2 NTFS "Use Simple File Sharing" is not

>> > checked.

>> >

>> > Thank you,

>> >

>> > Docfxit

>> >

>>

>> Could you explain what exactly you mean with this statement?

>> "When I run it from a different computer with a Remote Procedure Call"

>

> You can read a little about a Remote Procedure Call at

> http://searchsoa.techtarget.com/sDefinition/0,,sid26_gci214272,00.html

> Or you can Google it.

>

> It's very simple. The command that Is used and works on a '98 PC is:

> RUNRMTCMD CMD('C:\Batch\Scan.bat') RMTLOCNAME('192.168.1.4' *IP)

> RMTUSER('SCANS') RMTPWD(password)

>

> What is supposed to happen is the remote computer runs that command with

> the

> IP address pointing to the computer I am running. It requests

> the program C:\Batch\Scan.bat. It requests that it use the user SCANS on

> this computer and it supplies a password for the user SCANS.

>

> The there is a service on the local computer that runs RUNRMTCMD. In the

> setup of the service it has LOGON as Local system account, Allow service

> to

> interact with desktop.

>

> I don't know if you can reproduce it but you might be able to figure out

> why

> it appears to run under the user NT Authority\System instead of SCANS and

> or

> how I can give it the proper authority to run under NT Authority\System.

>

> If I can get the RUNAS command to run the program ScanFiles.exe I'm hoping

> it will map the drive and run the program.

>

> Thank you,

>

> Docfxit

 

Sorry, I know nothing about RUNRMTCMD. When I want to

execute a command remotely then I use psexec.exe

(http://www.sysinternals.com) which I believe is the standard tool for

such tasks. It offers the option to run the remote session under

an account other than my own, which removes the need to use

runas.exe.

Guest Docfxit
Posted

Re: RUNAS ERROR: 87: The parameter is incorrect.

 

 

 

"Pegasus (MVP)" wrote:

>

> "Docfxit" <Docfxit@discussions.microsoft.com> wrote in message

> news:5205F6D2-356F-4DAD-B96C-6CDD4A4B1B07@microsoft.com...

> >

> >

> > "Pegasus (MVP)" wrote:

> >

> >>

> >> "Docfxit" <Docfxit@discussions.microsoft.com> wrote in message

> >> news:DEDA74A6-B142-4283-AF00-1BE56B8409D7@microsoft.com...

> >> > I'm trying to run:

> >> > %comspec% /K runas /user:scans "ScanFiles.exe"

> >> >

> >> > When I run this within the current user (ATU4)

> >> > it runs fine. When I run it from a different

> >> > computer with a Remote Procedure Call I get an

> >> > error SAYING:

> >> > Enter the password for scans:

> >> > Attempting to start ScanFiles.exe as user "ATUUSER4\scans" ...

> >> > RUNAS ERROR: Unable to run - ScanFiles.exe

> >> > 87: The parameter is incorrect.

> >> >

> >> > When I look at Security for Scanfiles.exe it

> >> > shows for ATUUSER4\Scans that it has Read

> >> > and Execute rights.

> >> >

> >> >

> >> > I have tried changing the user to

> >> > administrator with the administrator password and it

> >> > produced the same error.

> >> >

> >> > Then I signed on as administrator and ran with

> >> > /user:administrator it produced the same error.

> >> > Process Explorer shows CMD.exe running with the user

> >> > NT Authority\System.

> >> > I expected it to be running with the user

> >> > ATUUSER4\Administrator.

> >> >

> >> > I don't see what would stop your program from doing what

> >> > it is intended to do.

> >> >

> >> > I'm running this in XP Pro sp2 NTFS "Use Simple File Sharing" is not

> >> > checked.

> >> >

> >> > Thank you,

> >> >

> >> > Docfxit

> >> >

> >>

> >> Could you explain what exactly you mean with this statement?

> >> "When I run it from a different computer with a Remote Procedure Call"

> >

> > You can read a little about a Remote Procedure Call at

> > http://searchsoa.techtarget.com/sDefinition/0,,sid26_gci214272,00.html

> > Or you can Google it.

> >

> > It's very simple. The command that Is used and works on a '98 PC is:

> > RUNRMTCMD CMD('C:\Batch\Scan.bat') RMTLOCNAME('192.168.1.4' *IP)

> > RMTUSER('SCANS') RMTPWD(password)

> >

> > What is supposed to happen is the remote computer runs that command with

> > the

> > IP address pointing to the computer I am running. It requests

> > the program C:\Batch\Scan.bat. It requests that it use the user SCANS on

> > this computer and it supplies a password for the user SCANS.

> >

> > The there is a service on the local computer that runs RUNRMTCMD. In the

> > setup of the service it has LOGON as Local system account, Allow service

> > to

> > interact with desktop.

> >

> > I don't know if you can reproduce it but you might be able to figure out

> > why

> > it appears to run under the user NT Authority\System instead of SCANS and

> > or

> > how I can give it the proper authority to run under NT Authority\System.

> >

> > If I can get the RUNAS command to run the program ScanFiles.exe I'm hoping

> > it will map the drive and run the program.

> >

> > Thank you,

> >

> > Docfxit

>

> Sorry, I know nothing about RUNRMTCMD. When I want to

> execute a command remotely then I use psexec.exe

> (http://www.sysinternals.com) which I believe is the standard tool for

> such tasks. It offers the option to run the remote session under

> an account other than my own, which removes the need to use

> runas.exe.

 

Thanks for the reply.

 

I didn't expect you to know anything about RUNRMTCMD. Unfortunately I can't

use psexec.exe because it's not running from a PC. It's running from an

AS/400. I don't expect you to know anything about an AS/400 either.

 

All I need is to get the RunAs command working as designed within XP Pro.

The RUNRMTCMD is calling the bat file. From there it should run in XP and

it isn't. That's where my problem is.

 

Thank you,

 

Docfxit

Guest Docfxit
Posted

Re: RUNAS ERROR: 87: The parameter is incorrect.

 

 

 

"Docfxit" wrote:

>

>

> "Pegasus (MVP)" wrote:

>

> >

> > "Docfxit" <Docfxit@discussions.microsoft.com> wrote in message

> > news:5205F6D2-356F-4DAD-B96C-6CDD4A4B1B07@microsoft.com...

> > >

> > >

> > > "Pegasus (MVP)" wrote:

> > >

> > >>

> > >> "Docfxit" <Docfxit@discussions.microsoft.com> wrote in message

> > >> news:DEDA74A6-B142-4283-AF00-1BE56B8409D7@microsoft.com...

> > >> > I'm trying to run:

> > >> > %comspec% /K runas /user:scans "ScanFiles.exe"

> > >> >

> > >> > When I run this within the current user (ATU4)

> > >> > it runs fine. When I run it from a different

> > >> > computer with a Remote Procedure Call I get an

> > >> > error SAYING:

> > >> > Enter the password for scans:

> > >> > Attempting to start ScanFiles.exe as user "ATUUSER4\scans" ...

> > >> > RUNAS ERROR: Unable to run - ScanFiles.exe

> > >> > 87: The parameter is incorrect.

> > >> >

> > >> > When I look at Security for Scanfiles.exe it

> > >> > shows for ATUUSER4\Scans that it has Read

> > >> > and Execute rights.

> > >> >

> > >> >

> > >> > I have tried changing the user to

> > >> > administrator with the administrator password and it

> > >> > produced the same error.

> > >> >

> > >> > Then I signed on as administrator and ran with

> > >> > /user:administrator it produced the same error.

> > >> > Process Explorer shows CMD.exe running with the user

> > >> > NT Authority\System.

> > >> > I expected it to be running with the user

> > >> > ATUUSER4\Administrator.

> > >> >

> > >> > I don't see what would stop your program from doing what

> > >> > it is intended to do.

> > >> >

> > >> > I'm running this in XP Pro sp2 NTFS "Use Simple File Sharing" is not

> > >> > checked.

> > >> >

> > >> > Thank you,

> > >> >

> > >> > Docfxit

> > >> >

> > >>

> > >> Could you explain what exactly you mean with this statement?

> > >> "When I run it from a different computer with a Remote Procedure Call"

> > >

> > > You can read a little about a Remote Procedure Call at

> > > http://searchsoa.techtarget.com/sDefinition/0,,sid26_gci214272,00.html

> > > Or you can Google it.

> > >

> > > It's very simple. The command that Is used and works on a '98 PC is:

> > > RUNRMTCMD CMD('C:\Batch\Scan.bat') RMTLOCNAME('192.168.1.4' *IP)

> > > RMTUSER('SCANS') RMTPWD(password)

> > >

> > > What is supposed to happen is the remote computer runs that command with

> > > the

> > > IP address pointing to the computer I am running. It requests

> > > the program C:\Batch\Scan.bat. It requests that it use the user SCANS on

> > > this computer and it supplies a password for the user SCANS.

> > >

> > > The there is a service on the local computer that runs RUNRMTCMD. In the

> > > setup of the service it has LOGON as Local system account, Allow service

> > > to

> > > interact with desktop.

> > >

> > > I don't know if you can reproduce it but you might be able to figure out

> > > why

> > > it appears to run under the user NT Authority\System instead of SCANS and

> > > or

> > > how I can give it the proper authority to run under NT Authority\System.

> > >

> > > If I can get the RUNAS command to run the program ScanFiles.exe I'm hoping

> > > it will map the drive and run the program.

> > >

> > > Thank you,

> > >

> > > Docfxit

> >

> > Sorry, I know nothing about RUNRMTCMD. When I want to

> > execute a command remotely then I use psexec.exe

> > (http://www.sysinternals.com) which I believe is the standard tool for

> > such tasks. It offers the option to run the remote session under

> > an account other than my own, which removes the need to use

> > runas.exe.

>

> Thanks for the reply.

>

> I didn't expect you to know anything about RUNRMTCMD. Unfortunately I can't

> use psexec.exe because it's not running from a PC. It's running from an

> AS/400. I don't expect you to know anything about an AS/400 either.

>

> All I need is to get the RunAs command working as designed within XP Pro.

> The RUNRMTCMD is calling the bat file. From there it should run in XP and

> it isn't. That's where my problem is.

>

> Thank you,

>

> Docfxit

 

I have made some progress with this. I have resolved the original error

saying

87: The parameter is incorrect.

I changed the bat file to look like this:

CD C:\Batch

%comspec% /K "runas /user:scans ScanFiles.exe"

 

The only thing I did was I added the CD C:\Batch

 

Now I am getting an error that says:

 

Attempting to start ScanFiles.exe as user "ATUUSER4\scans" ...

RUNAS ERROR: Unable to run - ScanFiles.exe

5: Access is denied.

 

Any idea why it's giving me Access is denied?

 

Thank you,

 

Docfxit

Guest Docfxit
Posted

Re: RUNAS ERROR: 87: The parameter is incorrect.

 

I have fixed the problem.

 

I was trying to use runas because I was told when launching a program

through the network it doesn't have enough authority to connect to a network

drive. And I was not able to get Net Use to work which confirmed it. I got

it working with AutoIt without the runas.

 

Thank you,

 

Docfxit


×
×
  • Create New...