How do I create a batch file to execute a windows based program AND enter a username and password?

2012-12-13 6:01 pm
I can create the batch file to start the program, but once the program starts it pops a login window which prompts a username and password. I'd like for the batch file to enter the username and password to finish launching the program without any user interaction. I know it can be done but don't know the proper syntax.

This is to launch a remote viewing program for security camera's on a watch desk that will be manned by random people without special skills. All other actions on the computer will be admin'd out.
更新1:

After doing some more research it turns out that ability has been programmed out for security reasons (from the batch file). There are other ways to get around it, but its more elaborate programming, something not possible in a batch file.

回答 (3)

2012-12-13 6:06 pm
✔ 最佳答案
Some programs have command line options for this. You'll have to check the specific program you're using.

In a command window, try entering:

prog_name /h

or

prog_name /help

That will often give you the command line options.

You might also look for a "prog_name.INI" file in the program's installation directory. It might provide you with a default username/password option.

If all else fails, read the manual, or contact the vendor.

Good luck.
2012-12-13 6:05 pm
Try just adding the username and password at the end of the line.
The program might support %1 and %2 type of arguments.
2012-12-13 10:05 pm
Look up vTask Studio. I think you can find that to be very helpful as well. Check it out.


收錄日期: 2021-04-21 14:54:02
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20121213100113AAo7tm8

檢視 Wayback Machine 備份