I have a webpage that requires users to enter their credentials in a 'Connect to "ServerName"' d开发者_高级运维ialog box and click OK. I want to automate this login proccess using C# or PowerShell. Is this possible? If not, is there another way of automating this?
Looks like you are trying to execute the webpage automatically and that popup is blocking you from doing that, if that the case you can use SendKeys to type in the boxes
Also a macro recorder being fired by a scheduler task will do it.
you can also instead of trying to open the webpage make a WebRequest from a C# application passing the credentials , that will lead you to the same results... regards
It is possible, but it is probably far easier to use AutoHotkey.
It can be scripted to watch for a window of a certain name and then send keystrokes to that window automatically. Alternatively, you can set up the script so that the user just has to press some key or series of keys in that window and it will be converted to a set of keystrokes.
The download also includes a compiler, so once you get your script right you can compile it to an .exe to distribute.
精彩评论