I have a text file that I need to open in Notepad.exe and have the user add some input to it. Then I would like to print the file to AdobePDF when the user exits the file.
Here is what I have to open the file
Start-Process notepad.exe C:\path\to\text\file\MyTextFile.txt -NoNewWindow -Wait
Not sure how to Print PDF on exit. AdobePDF is an installed printer but it is NOT THE DEFAULT printer. Any help or tips would be greatly appreciated.
You can try something like this,
--EDIT--
I could not figure out a direct approach to retain the file name, kind of wrote a hack with ms word,
See if that helps!