Copy link to clipboard
Copied
I have been developing a Bridge script to call Adobe DNG Converter as it has a command line interface. However, Windows pops up an ugly command window when using app.system().
After some research, I've been able to call the DNG Converter silently using vbs and powershell.
You assemble a powershell command and write it to a .vbs (plain text) script file, then use file.execute() to run that script. I'm using Folder.temp to write into the user temp folder.
Syntax is as follows:
CreateObject("Wscript.Shell").Run "powershell -NoLogo -NoProfile -Command Start-Process -FilePath 'C:\Program Files\Adobe\Adobe DNG Converter\Adobe DNG Converter.exe' -ArgumentList '-c \""C:\Users\user\Pictures\Product Images\Incoming\test\20CH-L-PA.CR2\"" \""C:\Users\user\Pictures\Product Images\Incoming\test\20CH-L-PB.CR2\"" \""C:\Users\user\Pictures\Product Images\Incoming\test\21CH-L-A.CR2\""'", 0, True
Note the quoting, the escaped double double quotes are required to pass files with a space in the pathname. "-c" is the default command line switch for the DNG Converter, Adobe has a pdf with a list of all available switches. The 0 tells vbs to not show a GUI.
This isn't a problem on the Mac which (of course) is more elegant and doesn't show a Terminal window when you call app.system.
Copy link to clipboard
Copied
I don't like that Windows ugly command line window when using app.system() so I used VBScript too.