Simple solution
If the output path doesn't matter, you could try PDFCreator with the following commandline:
C:\Program Files (x86)\PDFCreator>PDFCreator.exe /NOSTART /PF"C:\test.doc"
- Per GUI you have to enable Use Auto-save and set a auto-save path once.
From now on, this path will be used every time you execute the command above
- You have to set PDFCreator as your default printer
Tip:
Per GUI you can save your settings in a profile (.INI file) which can then be selected when you execute your command line. This way, you don't have to use Auto-save as default for every normal print (e.g. from Word or Excel)
PDFCreator.exe /NoStart /OptionsFile"C:\myprofile.ini" /PF"C:\test.doc"
Advanced solution
The advantage of the second solution is, that you don't have to set PDFCreator as your default printer and you have full control over the output file path and name
Install PDFCreator together with its COM module
Copy & paste this code to a textfile and save it as Convert2PDF.vbs
Set PDFCreator = Wscript.CreateObject("PDFCreator.clsPDFCreator", "PDFCreator_")
With PDFCreator
ReadyState = 0
.cStart "/NoProcessingAtStartup"
.cOption("UseAutosave") = 1
.cOption("UseAutosaveDirectory") = 1
.cOption("AutosaveFormat") = 0
.cOption("AutosaveStartStandardProgram") = 0
DefaultPrinter = .cDefaultprinter
.cDefaultprinter = "PDFCreator"
.cClearcache
.cPrinterStop = false
.cOption("AutosaveDirectory") = WScript.Arguments(1)
.cOption("AutosaveFilename") = WScript.Arguments(2)
.cPrintfile cStr(WScript.Arguments(0))
c = 0
Do While (ReadyState = 0) and (c < 120)
c = c + 1
Wscript.Sleep 250
Loop
.cDefaultprinter = DefaultPrinter
.cClearcache
WScript.Sleep 200
.cClose
End With
Public Sub PDFCreator_eReady()
ReadyState = 1
End Sub
You can execute your VBScript file from the command line with this syntax:
Convert2PDF.vbs "C:\input.doc" "C:\outputfolder" "outputfilename"
Personally I use a slightly different version where the input and output folder+filename stays the same. I created a shortcut in my shell:sendto folder to easily convert files per right-click

What kind of files are they? The program used to display, edit, and print the file will determine what terminal command should be used, if the command exists at all. – daxlerod – 2013-07-03T12:34:36.630
what error message do you get? – golimar – 2013-07-03T12:50:19.703
Do you need a specific output path or could it be the same path as the input path is? For example
print C:\test.docwould create a new PDF file underC:– nixda – 2013-07-03T12:59:23.927The path doesn't really matter, would prefer it to be the same as the input but that can be changed accordingly, the error im getting is: "Unable to initialize device CPW2" Although in printers this is the correct port. Im not sure whether its something to do with cutepdf itself – Ash King – 2013-07-03T13:06:39.247
@AshKing Hello, I would be pleased if you could leave some feedback to know if I have to improve my answer. – nixda – 2013-08-17T09:09:50.423