Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Runas doesn't work when called over a network


  • Please log in to reply

#1
docfxit

docfxit

    Member

  • Member
  • PipPipPip
  • 102 posts
I'm trying to run A bat file with:

- Begging of BAT file called Scan.bat
CD C:\Batch
%comspec% /K runas /user:scans "ScanFiles.exe"
- End of BAT file

When I run this within the current user (ATU4)
it runs fine. When I run it from a different
computer over a network with a user (scans) that is not logged on 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
5: Access is denied.

I have tried this bat file also getting the same error:

- Begging of BAT file called Scan.bat
CD C:\Batch
runas /u:%COMPUTERNAME%\Administrator "runas /netonly /u:%USERDOMAIN%\%USERNAME% ScanFiles.exe"
- End of BAT file

When I look at Security for Scanfiles.exe it shows for ATUUSER4\Scans that it has Full control.

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.

It has something to do with running over the network with a user that is not logged on.

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

Thank you,

Docfxit
  • 0

Advertisements


#2
docfxit

docfxit

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 102 posts
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
  • 0

#3
dsenette

dsenette

    Je suis Napoléon!

  • Community Leader
  • 26,047 posts
  • MVP
glad you got it working...sorry no one got to you...i was going to suggest CPAU...i use it to do pretty much what you're doing...the difference is you can create an encrypted job that will keep the password secret...
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP