shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Problem in printing

I have added a "print" button as in http://www.advancedinstaller.com/user-g ... ialog.html, which works fine on my machine.

But, On some other machine it throws up an error message saying "Run time error 1078" , "The file could not be found". When I try to debug this error it shows the following visual basic code

Code: Select all

Private Sub TmpDDE()
Dim t
Rem _DDE_Minimize
WordBasic.FileOpen "C:\DOCUME~1\arsk\LOCALS~1\Temp\tmp613.rtf"
t = WordBasic.IsDocumentDirty()
WordBasic.FilePrint 0
WordBasic.SetDocumentDirty t
WordBasic.DocClose
End Sub
I could not locate the file "C:\DOCUME~1\arsk\LOCALS~1\Temp\tmp613.rtf" in the disk. Any idea why is this happening?
Bogdan
Posts: 2791
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Problem in printing

Hi,

Do you have Enhanced UI enabled in your package? Also on what OSes does the print option works and on which it fails?

Best regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Problem in printing

Hi Bogdan,

Following are the answers to your questions
1) "User Interface->Use enhanced user interface->Only on Install" is checked
2) It worked on my windows xp machine, but it failed couple of times in the other windows xp machine.

Currently, I am not able to reproduce this. Will let you know in case if I find exact reproduction steps.
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Problem in printing

Hi Bogdan,

I could reproduce this in one of the XP machines in our lab. In this machine, sometimes I am getting this problem(1 in 5 times). If you need any log/info on this please let me know.

Some of our customers also reported problems saying printing is not working(Some of them have reported this problem as "Apparently clicking the "Print" button does something (it opens an Office application shortly and attempts to print?) nothing appears on my printer.")

Is there any other way to support "printing" (e.g. like MS Word which shows list of printers, and user could select the printer and print it).?

Regards,
Rohan
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Problem in printing

Some of our German customers also reported the same problem.
Attachments
Error in German machine
Error in German machine
PrintError-de.JPG (14.37 KiB) Viewed 10673 times
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Problem in printing

Hello Rohan,

I'm not sure why you are encountering this behavior. This may appear due to permissions rights of the related location. However, as a workaround you can open for print in wordpad the related text file using a custom action.

Here are the steps to proceed:
- Go to "Files and Folders" page and add your text file (e.g. ReadMe.rtf) as a temporary file.
- Go to "Custom Actions" page and add a "Launch file or open URL" custom action without sequence like this:
  • Command: write.exe /p [&ReadMe.rtf]
- Go to "Dialogs" page and add push button control. On the above button add the following published event:
  • Name: Execute custom action
    Argument: LaunchFileOrURL
- Build and run your project.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Problem in printing

Thanks for your help. I tested this and its working fine in a test program.

Can you also guide me, how to achieve the following
- I have two separate builds(say build1 and build2)
- Both these builds support 3 languages(i.e en ,de and sv)
- so I have 3 EULAs for build1(say build1_eula_en.rtf, build1_eula_de.rtf and build1_eula_sv.rtf)
- and also 3 EULAs for build2(say build2_eula_en.rtf, build2_eula_de.rtf and build2_eula_sv.rtf)
- currently, I have supported displaying the EULA as explained in http://www.advancedinstaller.com/forums ... =5&t=23175 which is pretty neat(with the exception that we need two edit boxes, and two print buttons instead of one edit box/print button)

Can you please help me in supporting printing these in a neat way.

Note: I would not mind copying the EULA to the system(not as temporary file)

Regards,
Rohan
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Problem in printing

I have added all these 6 EULA agreements as temporary files.
I have added 6 custom actions(build1_en, build1_de, build1_sv, build2_en, build2_de, build2_sv).
I have added 6 publish events for the print button(i.e one each for the build and language combination).
Do let me know if there is a other neat way of achieving this?
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Problem in printing

Hello,

I'm afraid there is no straightforward approach, than one you mentioned, in order to achieve what you want.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Problem in printing

Thanks Daniel
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Problem in printing

Hi Daniel,

As you had suggested WordPad printing is working fine.

But in one of the machine it did not work, then we found that WordPad is not installed on that machine. Would it be possible to have a better printing mechanism in the future versions(e.g. show the printer selection dialog box, and then print)?
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Problem in printing

Hello Rohan,
But in one of the machine it did not work, then we found that WordPad is not installed on that machine.
In order to avoid this you can add WordPad as a pre-install prerequisite to your installation project.

Also, please keep in mind that our print functionality uses the standard Windows Installer print support and this is the default behavior. I'm afraid that in order to achieve what you want you should develop your own custom action which will implement this behavior.

Thank you for your understanding.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
shetty_rohan
Posts: 363
Joined: Fri Dec 07, 2012 5:28 am
Location: Bangalore, India
Contact: Website

Re: Problem in printing

Thank you for your response

Return to “Building Installers”