problem passing parameter with batch file - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

placebo
Posts: 3
Joined: Fri Jun 25, 2010 9:56 am

problem passing parameter with batch file

Hi,

I have problems with passing parameters to a batch file in a custom script.

This is the method I use to call the batch and pass the parameter:

Code: Select all

"[&pdfprinter.cmd]" "[#ghostpdf.inf]"
My batch file contains this code:

Code: Select all

rundll32 printui.dll,PrintUIEntry /if /f "%1" /r "file:" /m "Ghostscript PDF" /b "Sybase DataWindow PS"
When I test my installer, I see this code:

Code: Select all

rundll32 printui.dll,PrintUIEntry /if /f "" /r "file:" /m "Ghostscript PDF" /b "Sybase DataWindow PS"
The problem is that my batch doesn't recognize the parameter. Before I call this batch, I use a messagebox to show the path and file name (which are correct).

Does anyone knows how to solve this problem? Sorry for my English!


Thanks in advance!
placebo
Posts: 3
Joined: Fri Jun 25, 2010 9:56 am

Re: problem passing parameter with batch file

hi,

I've solved my problem. I don't know if it is correct, but it works:

Code: Select all

"[&pdfprinter.bat]" "[lib_DIR]
and, my batch-file contains:

Code: Select all

rundll32 printui.dll,PrintUIEntry /if /f %1ghostpdf.inf" /r "file:" /m "Ghostscript PDF" /b "Sybase DataWindow PS"

by!

Return to “Common Problems”