Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

Set OpenFile Dialog Button

Updated: 24 May 2010 | 3 comments
JeffHu's picture
0 0 Votes
Login to vote

Hi,

I am using Wise for Windows Installer 6.20 and am stuck on a problem I am hoping I can get assistance on.  What I am trying to do is create a new Dialog, which includes a button to allow users to browse for a certain file and when they push the Next button, the file would be copied to a specific location.

The problem I am running into is I want to set the button to a "OpenFile" dialog message and specific in the "OpenFile" dialog to accpet files with a ".txt" extension.  However, when looking, Wise does not seem to have a "OpenFile" option for buttons.  The only thing I can see is a SpawnDialog option, which is to set the directory, not a specific file.  Maybe I am missing something.  Any help would be greatly appreciated.

discussion Filed Under:

Comments

EdT's picture
10
Jun
2009
0 Votes 0
Login to vote

File browse dialog

The native capabilities of windows installer are somewhat limited when it comes to browsing issues - after all, the most common browse event during an install is to pick an installation folder.

I believe you will have to write a custom action to provide a browse dialog that can browse for files rather than folders, and since you have WFWI 6.2, you should also have the basic wisescript editor for creating custom actions. So have a look in the wisescript library maintained by Dragonsoft, where you should be able to find some example browse for file dialog wisescripts. You may be able to adapt one of these to run as a custom action in your install.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

VBScab's picture
10
Jun
2009
0 Votes 0
Login to vote

Does WiseScript have access

Does WiseScript have access to COM? If so, it should be pretty straight-forward to access the MS Common dialogs, using the "MSComDlg.CommonDialog" object.

Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using http://www.google.com before posting.

EdT's picture
10
Jun
2009
0 Votes 0
Login to vote

Wisescript can make DLL calls

That's as close as you can get to access to COM.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.