Need help creating a batch file for running an audit program on a single PC
Posted on 2008-06-09
We use OpenAudit to audit our PCs. I need a batch file that does the following. I'm struggling to get my version to work, and I'm not sure why. I would script it, but I'm not well-versed at scripts yet.
1. Change the directory to C:\wamp\www\openaudit\scripts
- I know that I can do that with cd c:\wamp\www\openaudit\scripts
2. Ask the user for the PC name
- I have been using 'set /P choice=Name of PC?' as my command.
3. Plug name of PC into line of code as follows: 'cscript audit.vbs [pcname]'
- Been using if commands with no luck. Program just quits instead of running.
Also,I would like it If the PC name is left empty, generate an error, otherwise run the program.
Thoughts? Thanks ahead of time!