To prevent a parameter value that contains spaces (e.g. if you are passing a directory path) from being broken up, enclose it inside a couple of "".
Automate Sitemap Generator with Windows Command Line and Batch Files
Create a batch file, e.g. "batch-file.bat", using any standard text editor
Example of what to write underlined: [ "c:\microsys\sitemap\Sitemap.exe" -exit -scan -build -upload -save ":c:\microsys\sitemap\projects\my-project.ini" ].
Save your batch file. You can now call it yourself or from other programs and scripts.
Download this ZIP file containing a demo project including ".bat" file to get you started.
Schedule and automate Sitemap Generator with Windows Task Scheduler
Open Control Panel | Scheduled Tasks | Add Scheduled Task. Follow the guide.
Open the generated sitemap generator time scheduled item to edit details, e.g. command line paramaters.