Hello , I habe a problem when I try to use COnfig.exe.
This is the code of my PowerBuilder Program
run('C:\config.exe /C')
run('C:\config.exe /S OUTPUT "C:\a.pdf"')
run('C:\config.exe /S ShowSaveAS never')
run('C:\config.exe /S ShowSettings never')
run('C:\config.exe /S ShowPDF no')
run('c:\config.exe /S ConfirmOverwrite yes')
run('c:\config.exe /S OwnerPassword a')
run('c:\config.exe /S UserPassword b')
Config.exe dont work fine , dont create Pdf in the Output route.
What is Wrong ?
Waht is Wrong In Config.exe ??
Moderator: jr
I have tried to make a simple .bat file that does the same as your example.
SET CONFIG=C:\Program Files\Bullzip\PDF Printer\API\EXE\config.exe
"%CONFIG%" /C
"%CONFIG%" /S OUTPUT "C:\temp\a.pdf"
"%CONFIG%" /S ShowSaveAS never
"%CONFIG%" /S ShowSettings never
"%CONFIG%" /S ShowPDF no
"%CONFIG%" /S ConfirmOverwrite yes
"%CONFIG%" /S OwnerPassword a
"%CONFIG%" /S UserPassword b
As you can see I changed the output path because the job doesn't have write access to the root of the C drive on my system. This batch file runs without any problems on my system. You can try to use it to debug your problem. Please make sure that you have sufficient rights in the destination folder.
Regards,
Jacob
SET CONFIG=C:\Program Files\Bullzip\PDF Printer\API\EXE\config.exe
"%CONFIG%" /C
"%CONFIG%" /S OUTPUT "C:\temp\a.pdf"
"%CONFIG%" /S ShowSaveAS never
"%CONFIG%" /S ShowSettings never
"%CONFIG%" /S ShowPDF no
"%CONFIG%" /S ConfirmOverwrite yes
"%CONFIG%" /S OwnerPassword a
"%CONFIG%" /S UserPassword b
As you can see I changed the output path because the job doesn't have write access to the root of the C drive on my system. This batch file runs without any problems on my system. You can try to use it to debug your problem. Please make sure that you have sufficient rights in the destination folder.
Regards,
Jacob
Ok , withs .bat file rules fine .
I discover what is wrong in mi program , the problem is time question if use sleep after run config.exe writes ok.
If I do :
run('C:\config.exe /S OUTPUT "C:\a.pdf"')
sleep(1)
run('C:\config.exe /S ShowSaveAS never')
sleep(1)
run('C:\config.exe /S ShowSettings never')
sleep(1)
run('C:\config.exe /S ShowPDF no')
sleep(1)
run('c:\config.exe /S ConfirmOverwrite yes')
sleep(1)
run('c:\config.exe /S OwnerPassword a')
sleep(1)
run('c:\config.exe /S UserPassword b')
sleep(1)
Thanks for all
I discover what is wrong in mi program , the problem is time question if use sleep after run config.exe writes ok.
If I do :
run('C:\config.exe /S OUTPUT "C:\a.pdf"')
sleep(1)
run('C:\config.exe /S ShowSaveAS never')
sleep(1)
run('C:\config.exe /S ShowSettings never')
sleep(1)
run('C:\config.exe /S ShowPDF no')
sleep(1)
run('c:\config.exe /S ConfirmOverwrite yes')
sleep(1)
run('c:\config.exe /S OwnerPassword a')
sleep(1)
run('c:\config.exe /S UserPassword b')
sleep(1)
Thanks for all
You are right. It's the timing that is the problem. I just did some basic research on the function that you use to start another application. You are using the Run command of PowerScript, which is the scripting language of PowerBuilder by Sybase.
http://manuals.sybase.com/onlinebooks/g ... __BookView
When I look in the reference at the link above there is nothing in the description of the Run command that tells me it it will pause the script execution until the external program has terminated. If it doesn't wait you will end up starting multiple instances of the config.exe program trying to access the same settings.ini or runonce.ini file. This will lead to a resulting ini file where some of the entries are missing.
Best Regards,
Jacob
http://manuals.sybase.com/onlinebooks/g ... __BookView
When I look in the reference at the link above there is nothing in the description of the Run command that tells me it it will pause the script execution until the external program has terminated. If it doesn't wait you will end up starting multiple instances of the config.exe program trying to access the same settings.ini or runonce.ini file. This will lead to a resulting ini file where some of the entries are missing.
Best Regards,
Jacob