Welcome Guest ( Log In | Register )

      
Discover the best free computer help!
Learn more about Geeks to Go by taking the tour. Spyware, virus, trojan, fake security or privacy alerts? Read the malware cleaning guide.
 
Reply to this topicStart new topic
RUNAS ERROR: 87: The parameter is incorrect.
docfxit
post May 12 2008, 05:53 PM
Post #1


Member
**
Posts: 16
OS: 98, xp



I'm trying to run A bat file with:
%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: (I input the correct password)
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 runas 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
Go to the top of the page
 
+Quote Post
Ztruker
post May 12 2008, 08:55 PM
Post #2


Member 2k
Group Icon
Posts: 2,377
From: Space Coast
OS: XP Pro + SP2



Hi docfxit.

What do you mean by "When I run it from a different computer with a Remote Procedure Call"? What interface are you using?

I'd like to try this to see if I can help but need to understand what (and how) you are doing this.
Go to the top of the page
 
+Quote Post
docfxit
post May 13 2008, 09:22 AM
Post #3


Member
**
Posts: 16
OS: 98, xp



Thank you for taking a stab at this.

You can read a little about a Remote Procedure Call at http://searchsoa.techtarget.com/sDefinitio...i214272,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.

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 will map the drive and run the program.
Thank you,

Docfxit
Go to the top of the page
 
+Quote Post
Ztruker
post May 13 2008, 03:39 PM
Post #4


Member 2k
Group Icon
Posts: 2,377
From: Space Coast
OS: XP Pro + SP2



Where did you get RUNRMTCMD? It's not part of XP.

Perhaps it needs to be recompiled under XP.
Go to the top of the page
 
+Quote Post
docfxit
post May 13 2008, 07:29 PM
Post #5


Member
**
Posts: 16
OS: 98, xp



QUOTE (Ztruker @ May 13 2008, 01:39 PM) *
Where did you get RUNRMTCMD? It's not part of XP.

Perhaps it needs to be recompiled under XP.


The RUNRMTCMD is run from an AS/400 not a windows computer. It is provided by IBM to run a command on a PC.
The RUNRMTCMD is running and executing the bat file in windows. The problem is the RUNAS command in winodws.

I have resolved the initial error by changing the BAT file to read:
CD C:\Batch
%comspec% /K "runas /user:scans ScanFiles.exe"

I added the CD C:\Batch and that resolved the error
87: The parameter is incorrect.

Now I am getting another error saying:

Attempting to start ScanFiles.exe as user "ATUUSER4\scans" ...
RUNAS ERROR: Unable to run - ScanFiles.exe
5: Access is denied.

Any idea why I would get Access is denied?

Thank you,

Docfxit
Go to the top of the page
 
+Quote Post
Ztruker
post May 13 2008, 08:10 PM
Post #6


Member 2k
Group Icon
Posts: 2,377
From: Space Coast
OS: XP Pro + SP2



This is the help for the runas command on XP Pro.

CODE
RUNAS USAGE:

RUNAS [ [/noprofile | /profile] [/env] [/netonly] ]
        /user:<UserName> program

RUNAS [ [/noprofile | /profile] [/env] [/netonly] ]
        /smartcard [/user:<UserName>] program

   /noprofile        specifies that the user's profile should not be loaded.
                     This causes the application to load more quickly, but
                     can cause some applications to malfunction.
   /profile          specifies that the user's profile should be loaded.
                     This is the default.
   /env              to use current environment instead of user's.
   /netonly          use if the credentials specified are for remote
                     access only.
   /savecred         to use credentials previously saved by the user.
                     This option is not available on Windows XP Home Edition
                     and will be ignored.
   /smartcard        use if the credentials are to be supplied from a
                     smartcard.
   /user             <UserName> should be in form USER@DOMAIN or DOMAIN\USER
   program         command line for EXE.  See below for examples

Examples:
> runas /noprofile /user:mymachine\administrator cmd
> runas /profile /env /user:mydomain\admin "mmc %windir%\system32\dsa.msc"
> runas /env /user:user@domain.microsoft.com "notepad \"my file.txt\""

NOTE:  Enter user's password only when prompted.
NOTE:  USER@DOMAIN is not compatible with /netonly.
NOTE:  /profile is not compatible with /netonly.

Perhaps the problem is the form of /user you are using? According to this help, it should be:

/user <UserName> should be in form USER@DOMAIN or DOMAIN\USER
Go to the top of the page
 
+Quote Post
docfxit
post May 13 2008, 09:10 PM
Post #7


Member
**
Posts: 16
OS: 98, xp



QUOTE (Ztruker @ May 13 2008, 06:10 PM) *
Perhaps the problem is the form of /user you are using? According to this help, it should be:

/user <UserName> should be in form USER@DOMAIN or DOMAIN\USER


I have tried:
%comspec% /K "runas /user:atuuser4\scans ScanFiles.exe"
and I have tried:
%comspec% /K "runas /user:scans@atuuser4 ScanFiles.exe"

Both give the same error:
Attempting to start ScanFiles.exe as user "ATUUSER4\scans" ...
RUNAS ERROR: Unable to run - ScanFiles.exe
5: Access is denied.

Just a note: I am currently running with a Workgroup not a domain.

Thank you,

Docfxit
Go to the top of the page
 
+Quote Post
Ztruker
post May 14 2008, 05:16 PM
Post #8


Member 2k
Group Icon
Posts: 2,377
From: Space Coast
OS: XP Pro + SP2



Like you, I can make this work locally. I have no means of making an RPC call to any of my other computers in my local workgroup to test that part of it unfortunately, unless you know of some program/script I can run that will allow me to do so I'm afraid I'll have to bail out on this one.

Hmmm, try posting a link to this thread in the Network forum here, asking some of the folks there to look at this and see if they have any ideas.
Go to the top of the page
 
+Quote Post
docfxit
post May 15 2008, 08:05 AM
Post #9


Member
**
Posts: 16
OS: 98, xp



That is very nice of you to try to figure it out.

Maybe you know of some way for me to debug this. I'd be interested in finding out what object is giving the Access Denied message.

Thank you,

Docfxit
Go to the top of the page
 
+Quote Post
docfxit
post May 21 2008, 01:22 PM
Post #10


Member
**
Posts: 16
OS: 98, xp



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
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Collapse

> Similar Topics

    Topic Title Replies / Views Topic Information
No New Posts   2 / 536 31st August 2005 - 02:21 PM
mpiotro started - last by mpiotro
No New Posts 1 / 297 25th September 2005 - 02:46 PM
breathofheaven started - last by Fenor
No New Posts   12 / 1,098 30th September 2007 - 11:45 PM
ChloeGirldie started - last by peterm
No new   16 / 832 13th August 2008 - 03:23 PM
bake started - last by bake

RSS Time is now: 22nd November 2008 - 11:24 AM
Advertisements do not imply our endorsement of that product or service. The forum is run by volunteers who donate their time and expertise. We make every attempt to ensure that the help and advice posted is accurate and will not cause harm to your computer. However, we do not guarantee that they are accurate and they are to be used at your own risk.