New
#21
Trying same thing, but in my case I don't want to simple use runas cmd. I need to interact with multiple user accounts and take over control of them from time to time. So I look for possibility to autologon all available user accounts by a batch file.
All users can be controlled via RDP, but on system start there should be auto logon for all users to execute the different autostart programs.
So if I restart computer I want to logon to administrator account manually and then there should be run a batchfile in autostart that logons the other accounts automatically.
Batchfile should look like this:
logon user2 pw
logon user3 pw
logon user4 pw
...
EDIT:
Sorry your forum seems to hate line breaks, no idea why my posting isn't formated like I send it...
EDIT2:
Disabled javascript was the problem...
I cannot think of a way of doing this without the RunAs. Why do you NOT want to use the RunAs?
I don't want to use runas, because I don't want to modify the autostart programs each time by myself. All users have the privilege to decide for themselves what kind of programs should be launched automatically on startup, so there could be changes from time to time. To prevent long waiting time on first user login and to ensure that some server based programs are running after a systemstart on these accounts without interaction of these users I want to logon all users by a script.
It's by the way a Windows 2k8 R2 Terminal Server not Windows 7. Perhaps someone knows a way to realize autologon for multiple accounts.
You could test doing this:
Use mstsc.exe from the command line:
mstsc.exe [<Connection File>] [/v:<Server>]
Connect manually and save the .RDP file with the username and password saved.
Then:
This is untested. You will have to give it a try. -WSCode:@echo off %windir%\system32\mstsc.exe user1.rdp /v:W2K8R2-Server %windir%\system32\mstsc.exe user2.rdp /v:W2K8R2-Server %windir%\system32\mstsc.exe user3.rdp /v:W2K8R2-Server %windir%\system32\mstsc.exe user4.rdp /v:W2K8R2-Server %windir%\system32\mstsc.exe user5.rdp /v:W2K8R2-Server
Try this application:
Autologon by LogonExpert
Let me bring my humble opinion to this discussion.
Since 2009, I have been using a technique which I discovered on my own.
In each of the non-main users, go to task scheduler and create a basic task - when the computer starts - run a program. Then tick "Open Properties Dialog..."
Choose: Run whether user is logon or not. Tick do not store password. Save the task.
No need to put the program in startup folder.
Repeat the above process for each user. Problem solved! Thank me later.