The invention discloses a method for automatically unlocking Windows through software. The method comprises the steps that firstly, a cloud expansion Windows screen unlocking service is installed, and after installation succeeds, a'cloud expansion Windows screen unlocking service 'is additionally provided on a screen locking login interface; 2, in the RPA writing process, the unlocking assembly is placed in a needed place; and step 3, when the process runs, if the computer is in a screen locking state, the cloud expansion Windows screen unlocking service begins to poll and check the credential, if the credential exists, Windows unlocking is triggered, and if the provided user name and password are correct, Windows unlocking succeeds, and if the provided user name and password are wrong, prompt information of login failure is seen on a screen locking login interface. The method is free of intervention, high in reliability, capable of reducing cost input and suitable for all Windows users of a local machine, and the problem that login cannot be achieved if biological recognition information is not input in the early stage is solved.