[SOLVED] Package with absolute path requirement.
Published: June 9, 2020 - 5:22 PM
Hello,
I'm following up on my first post: viewtopic.php?f=9&t=2389 , regarding creating a printer.
The script suggested by sfonteneau works. However, there's no configuration, and my driver, by default, chooses an unbelievable format (8.5 x 11").
So I wanted to configure it, but these settings aren't readily available (or I'm just not good at searching). I did manage to find a solution by exporting and then importing a configuration using the command:
- RUNDLL32.EXE PRINTUI.DLL,PrintUIEntry /Ss /n "Schumann copier 5th floor" /a C:\A4-format.dat
- RUNDLL32.EXE PRINTUI.DLL,PrintUIEntry /Sr /n "Schumann copier 5th floor" /a C:\A4-format.dat
Edit: Note: Of course, I only perform the export once, on a machine that's already configured, to get the basic configuration. Then I try to reproduce the import with /Sr using a package. wapt.
However, the command only works during import when we have an absolute path. The test below leads me to this conclusion:
When I'm in my command prompt at c:> and I type the option /a 'A4-format.dat', the operation fails and stops, but with /a 'C:/A4-format.dat' it works, and when checking the printer properties, the format has indeed changed. The result is the same whether the command prompt window is launched as administrator or not.
My question is:
- Have I misunderstood something in the execution of printui.exe? Do you have any documentation on how to directly assign the printer settings, rather than relying on a configuration file?
- If I understand correctly, what solution should I recommend?
- There is a folder on the client computer, for each wapt package, which could be pointed to with an absolute path that would therefore not change for each Workstation?
- Should we use a network share to store the source files?
- Another solution? (Use a command to copy the .dat source file to the client workstations, for example to c:/source_wapt/fichier.dat, then set the new absolute path, thus avoiding a general configuration, but using a general script.)
I'm following up on my first post: viewtopic.php?f=9&t=2389 , regarding creating a printer.
The script suggested by sfonteneau works. However, there's no configuration, and my driver, by default, chooses an unbelievable format (8.5 x 11").
So I wanted to configure it, but these settings aren't readily available (or I'm just not good at searching). I did manage to find a solution by exporting and then importing a configuration using the command:
- RUNDLL32.EXE PRINTUI.DLL,PrintUIEntry /Ss /n "Schumann copier 5th floor" /a C:\A4-format.dat
- RUNDLL32.EXE PRINTUI.DLL,PrintUIEntry /Sr /n "Schumann copier 5th floor" /a C:\A4-format.dat
Edit: Note: Of course, I only perform the export once, on a machine that's already configured, to get the basic configuration. Then I try to reproduce the import with /Sr using a package. wapt.
However, the command only works during import when we have an absolute path. The test below leads me to this conclusion:
When I'm in my command prompt at c:> and I type the option /a 'A4-format.dat', the operation fails and stops, but with /a 'C:/A4-format.dat' it works, and when checking the printer properties, the format has indeed changed. The result is the same whether the command prompt window is launched as administrator or not.
My question is:
- Have I misunderstood something in the execution of printui.exe? Do you have any documentation on how to directly assign the printer settings, rather than relying on a configuration file?
- If I understand correctly, what solution should I recommend?
- There is a folder on the client computer, for each wapt package, which could be pointed to with an absolute path that would therefore not change for each Workstation?
- Should we use a network share to store the source files?
- Another solution? (Use a command to copy the .dat source file to the client workstations, for example to c:/source_wapt/fichier.dat, then set the new absolute path, thus avoiding a general configuration, but using a general script.)