Here is some info on creation of Windows shares by command-line. It involves a free download from Microsoft called RMTSHARE.
Category: Command Line
Command-line creation of Windows shares
article #74, updated 5854 days ago
Best command-line reference for many systems
article #73, updated 5854 days ago
Probably the very best command-line reference, for Windows, Bash, Oracle, and SQL Server:
http://www.ss64.com/index.html
Change page files from the command line
article #69, updated 5908 days ago
This article:
http://technet.microsoft.com/en-us/library/bb490962.aspx
describes a little tool shipped with XP, 2003, and on up. But it doesn’t say how to execute it. Every time, in the above article, you see “pagefileconfig.vbs”, it should read:
%systemroot%\system32\pagefileconfig.vbs
With that one caveat, the tool can be very handy.