Printing License Agreement

Got a problem you cannot solve? Try here.
stevew
Posts: 78
Joined: Tue Dec 06, 2005 2:01 am

Printing License Agreement

Postby stevew » Sat Dec 24, 2005 3:30 am

Welcome Michael, here is a test question for you.

How can I most easily provide a Print License Agreement feature? I notice the newer setups provide this functionality. The tiny little license window does not allow for easy reading.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Sun Dec 25, 2005 7:28 pm

Hi Steve!

You should be able to do this if you add a Print button to your form, and then capture the click event on that button, and call Run Program on the license agreement file, open wordpad or notepad, with the print command line parameter.

You may study the CD Autorun template if you would like to find out how to capture clicks on form buttons - it is the perfect example.

Does this get me a pass on the test ;)
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

stevew
Posts: 78
Joined: Tue Dec 06, 2005 2:01 am

Postby stevew » Fri Dec 30, 2005 4:03 am

That CD AutoRun template is awesome. I see now how to do the printing using wordpad.

I haven't reviewed the CD Autorun template before because I wasn't making any CD install. I wish I had because I now have some new ideas on how this template can be used for other purposes. This template is good because it also shows how to do a loop ... which i didn't want to get into because I read you couldn't do looping ... but i see now there are some exceptions and you can do some menu processing style loops.

Thankyou!

jondr
Posts: 12
Joined: Wed Feb 01, 2006 2:05 pm

I still don't get it.

Postby jondr » Thu Feb 02, 2006 3:13 pm

MichaelNesmith wrote:You should be able to do this if you add a Print button to your form, and then capture the click event on that button, and call Run Program on the license agreement file, open wordpad or notepad, with the print command line parameter.

You may study the CD Autorun template if you would like to find out how to capture clicks on form buttons - it is the perfect example.


It was easy to add a print button to the Autorun example. In the wizard dialog I inserted a BitBtn button named "Print". I did not modifiy Object Rules or Object Behavior. In fact, I want to Have the control "Print" write to a variable, but that option is greyed out on the Object Behavior dialog. I can't see any difference between the Object Propeties of my button and the other buttons that do allow writing values to variable. :(

In the script there is a comment "// Exit Applet" and then several "ifs" referring to a variable "CHOICE". What is the applet? From where/when the variable CHOICE? If I try to add to the script:

    If Variable CHOICE Equals PRINT
    Run Program $PROGRAMFILES$\\Windows NT\\accessories\\wordpad.exe /p $SUPPORTDIR$\\license.rtf (WAIT)
    end


then nothing happens (I added license.rtf as a support file ...Remember that you may include any file as a support file, and access it while the installation is running using the SUPPORTDIR variable).

I even tried moving this Run Program command into the "If Variable CHOICE Equals WEBSITE" section, and nothing happens.

When I add the Print button to the licensecheck dialog of a "Windows Installer" themed wizard project, I have no idea where to invoke the Run Program command, assuming I could get it to work.

We really want to buy InstallAware. I'm a novice at installation packages, so I'm somewhat at a loss here :? . I've read the entire help file (even copied into a document and created a PDF which I have read). I'm reading all the forum messages, and have read all the material on the ia website, but I'm not getting anywhere.

Thanks in advance for the assistance (my supervisor is awaiting some results before he'll spring for the purchase).
--
Jon

Gizm0
Posts: 339
Joined: Wed Nov 09, 2005 8:47 pm

Postby Gizm0 » Thu Feb 02, 2006 6:28 pm

Hello there,

the things you ask can be done and a much better way (custom dialogs etc).
I can provide consulting services and create the whole setup for you and your company, at a very competitive price.

If you are interested you can email me at pkefal (at) installaware (dot) com.Describe what exactly you want to do, and i'll reply to you how long it's going to take and how its going to cost.


Thank you,
Panagiotis Kefalidis
Software Design Team Lead
\"In order to succeed, your desire for success should be greater than your fear of failure\"
InstallAware Software Corporation

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Thu Feb 02, 2006 7:26 pm

Hi!

Easy answer for this one: The Display Dialog command is set to return its result in the CHOICE variable. That's where the infamous CHOICE comes from!

For capturing individual button clicks, you do not assign them to variables. Just set their "Performs Action" field to "Return from Dialog" and be sure the Display Dialog command is writing to a variable in the "Return Result in Variable" field. Then just read that variable...which, in the autorun sample, is CHOICE.

The value that "CHOICE" holds is the Name property of the button on the form that was clicked. So you can use the "Object Properties" window to customize the name of your button after plopping it on the form, and then just read the return using CHOICE.

Let me know if that helps!
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

jondr
Posts: 12
Joined: Wed Feb 01, 2006 2:05 pm

print the license agreement

Postby jondr » Fri Feb 03, 2006 1:02 am

Yes, that is exactly what I needed. I figured that was what CHOICE was, but the hint I needed was setting "Performs Action" to "Return from Dialog".

Now I need to debug the line

Code: Select all

Run Program $PROGRAMFILES$\\Windows NT\\accessories\\wordpad.exe /p  $SUPPORTDIR$\\license.rtf


which did not work. In fact, all we need there is:

Code: Select all

Run Program wordpad.exe /p $SUPPORTDIR$\\license.rtf


and VIOLA!

Thank you very much for your prompt assistance! :D
--

Jon


Return to “Technical Support”

Who is online

Users browsing this forum: Bing [Bot] and 190 guests