I need to change the second monitor's resolution when I login into an account.
I made a bat file which has a line ChangeScreenResolution.exe /w=1024 /h=768 /d=0
in it. I need it executed at login so whenever I enter a specific account the resolution changes to specified dimensions. I tried using task scheduler and use At Logon as a trigger but it didn't work. It throws 0x2 or 0xC0000005. I allowed the desired account to Log on as batch job in local politics. Another thing is that when I press Execute in the Task Scheduler interface, the task works, the resolution changes. But when I log out and in of the account, it throws errors.
Meanwhile If I choose At Unlock Working Machine, it works fine, I relogin with the desired resolution. I tried specifying paths to the .bat file in Start In property, tried using cmd.exe with the path to the bat as an argument. But with no avail. I require help of my peers because I've spent 6 hours already and my brain slowly deteriorates.