- 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