daal Posted August 31, 2006 Report Share Posted August 31, 2006 How can I remove "All files" pattern in File Dialog Is it possible? Some one have a work around? Thanks Dany Quote Link to comment
Gary Rubin Posted August 31, 2006 Report Share Posted August 31, 2006 How can I remove "All files" pattern in File Dialog If you're asking about 8.2, I can't help you. If you're asking about 7, just wire your desired pattern (i.e. *.txt) as a text string into the Pattern input terminal on the file dialog primative (lower left corner). Gary Quote Link to comment
daal Posted August 31, 2006 Author Report Share Posted August 31, 2006 If you're asking about 8.2, I can't help you. If you're asking about 7, just wire your desired pattern (i.e. *.txt) as a text string into the Pattern input terminal on the file dialog primative (lower left corner).Gary Yes it's about 8.2. When I put *.txt in the Pattern terminal the *.txt is added but *.* is still there as other pattern. Dany Quote Link to comment
EJW Posted August 31, 2006 Report Share Posted August 31, 2006 Yes it's about 8.2. When I put *.txt in the Pattern terminal the *.txt is added but *.* is still there as other pattern.Dany Unfortunately this is typical behavior of a file dialog box in Windows. Labview appears to only access the standard file dialog. When using things such as the Visual Studio environments, the "All Files" can be removed as you have access to more lower level functions. Quote Link to comment
Ton Plomp Posted August 31, 2006 Report Share Posted August 31, 2006 Unfortunately this is typical behavior of a file dialog box in Windows.Labview appears to only access the standard file dialog. When using things such as the Visual Studio environments, the "All Files" can be removed as you have access to more lower level functions. I think there is a way to bypass the windows dialog. There is as far as I know an option to use a crossplatform file-dialog, I suppose this one don't have that option. Another thing would be looking for a .NET class that will handle the case. Unfortunately I can't test it right now because I'm uninstalling 8.0 and installing 8.2 [Edit:]Found it, it is an option in Tools>Options>Envirenment>Use native File dialogs[/edit] Ton Quote Link to comment
daal Posted September 1, 2006 Author Report Share Posted September 1, 2006 I think there is a way to bypass the windows dialog. There is as far as I know an option to use a crossplatform file-dialog, I suppose this one don't have that option. Another thing would be looking for a .NET class that will handle the case.Unfortunately I can't test it right now because I'm uninstalling 8.0 and installing 8.2 [Edit:]Found it, it is an option in Tools>Options>Envirenment>Use native File dialogs[/edit] Ton I tried the LV file-Dialog with Native File Dialog to false in the INI file but it look not very standard. I want to create an application that look professional and integrated in windows. For the dotNet option, I dont want to install the dotNET framework on the 35 PCs that have already the application. The only choice is to create a clone of the NativeWindows File Dialog coded in LabVIEW ... A lot of work :headbang: and a very short time. Quote Link to comment
Jacemdom Posted September 1, 2006 Report Share Posted September 1, 2006 Why do you want to remove the *.* file pattern? Quote Link to comment
bsvingen Posted September 1, 2006 Report Share Posted September 1, 2006 Unfortunately I can't test it right now because I'm uninstalling 8.0 and installing 8.2[Edit:]Found it, it is an option in Tools>Options>Envirenment>Use native File dialogs[/edit] Ton I'm just curious to why you are uninstalling 8.0. The ability to have several LV versions and change between them at will, is probably one of the really strong things about LV. I have 6.1, 7.0, 7.1.1, 8.0.1 and 8.2 on the same PC. Quote Link to comment
Ton Plomp Posted September 1, 2006 Report Share Posted September 1, 2006 I'm just curious to why you are uninstalling 8.0. The ability to have several LV versions and change between them at will, is probably one of the really strong things about LV. I have 6.1, 7.0, 7.1.1, 8.0.1 and 8.2 on the same PC. My private laptop is kind of limited of diskspace (and at work I have complete set of 7.0 throught 8.2) 7.1 is very usefull when you are using scripting. Ton Quote Link to comment
tnt Posted September 1, 2006 Report Share Posted September 1, 2006 How can I remove "All files" pattern in File Dialog Hi, take a look at http://www.vi-lib.com/user.lib/OpenFileDialogBox.html this worked for me Good luck, TNT EDIT: the only problem I have is that I want to pass the owner to the dialogbox, because otherwise the vi could appear on top of the dialogbox and not always on top... This means a labview windowhandle is needed of the type Iwin32window (.NET) and I haven't figured out yet how to accomplish this Quote Link to comment
daal Posted September 5, 2006 Author Report Share Posted September 5, 2006 Why do you want to remove the *.* file pattern? In my case it's a security issue (exe can be executed by the file dialog), but after some test even when you remove the *.* from the file pattern, you can type it by your self and got all the file listed The only way is to create my own File Dialog Thank you for your help Have a nice labor day Dany Quote Link to comment
Ton Plomp Posted September 5, 2006 Report Share Posted September 5, 2006 In my case it's a security issue (exe can be executed by the file dialog), but after some test even when you remove the *.* from the file pattern, you can type it by your self and got all the file listed Hi Dany, in my opinion a user who knows how to execute an executable from the file browser knows how to run an executable in another way. Or are you disabling the windows key, ctrl-alt-del, ctrl-esc? Might it be possible to create a user account with almost no rights just to run your program? Maybe you can use the .net browser and run that one as a low-righted user? Ton Quote Link to comment
daal Posted September 5, 2006 Author Report Share Posted September 5, 2006 Hi Dany,in my opinion a user who knows how to execute an executable from the file browser knows how to run an executable in another way. Or are you disabling the windows key, ctrl-alt-del, ctrl-esc? Might it be possible to create a user account with almost no rights just to run your program? Maybe you can use the .net browser and run that one as a low-righted user? Ton I used a simple stategy to lock the user from executing other executable. I start my app at startup and I kill explorer.exe and for the operator account I restrict the acces to taskmgr.exe to be executed. That way you can't execute any other EXE and only if you don't have any File Dialog used in your App. Dany Quote Link to comment
Jacemdom Posted September 5, 2006 Report Share Posted September 5, 2006 I used a simple stategy to lock the user from executing other executable. I start my app at startup and I kill explorer.exe and for the operator account I restrict the acces to taskmgr.exe to be executed. That way you can't execute any other EXE and only if you don't have any File Dialog used in your App.Dany You could also configure the policies (or other config info, idon't remember the exact details) on your system to start your app instead of the explorer.exe. This can be configured by users and groups. I don't have all the info needed to achieve it. An experienced IT admin or tech should know how to, idf you have one available to consult. Quote Link to comment
EJW Posted September 11, 2006 Report Share Posted September 11, 2006 Download File:post-3482-1157995331.vi Hi,take a look at http://www.vi-lib.com/user.lib/OpenFileDialogBox.html this worked for me Good luck, TNT EDIT: the only problem I have is that I want to pass the owner to the dialogbox, because otherwise the vi could appear on top of the dialogbox and not always on top... This means a labview windowhandle is needed of the type Iwin32window (.NET) and I haven't figured out yet how to accomplish this I used the code at the above URL to make a VI using .NET that allows for inputs of Initial Directory, Filters, FilterIndex and Multiselect options (of course Error In) The outputs consist of an array of filenames and the dialog status (OK or Cancel) and Error Out. Hopefully this will be useful to you. You can change the default All Files to Text Files easily enough. The VI is attached. Eric Quote Link to comment
daal Posted September 13, 2006 Author Report Share Posted September 13, 2006 Thank you all for the replies :thumbup: Dany Quote Link to comment
texmet Posted August 31, 2012 Report Share Posted August 31, 2012 I think there is a way to bypass the windows dialog. There is as far as I know an option to use a crossplatform file-dialog, I suppose this one don't have that option. Another thing would be looking for a .NET class that will handle the case. Unfortunately I can't test it right now because I'm uninstalling 8.0 and installing 8.2 [Edit:]Found it, it is an option in Tools>Options>Envirenment>Use native File dialogs[/edit] Ton Hi I have version 2010 and I cannot find it in Tools>Options>Envirenment>Use native File dialogs Do you know how to do it in version 2010? Tx, Fabio Quote Link to comment
Onno Posted August 31, 2012 Report Share Posted August 31, 2012 Removing the "*.*" option will not remove the user's ability to show all files, and execute potentially unsafe programs. Just try entering "*" in any file dialog, and you'll all the files, no matter what the currently selected filter is. What you really want, is a way to lock down program execution on Windows. That is actually possible. It seems to be called Software Restriction Policy (SRP). Read about it on, for example, MS Technet. Quote Link to comment
texmet Posted August 31, 2012 Report Share Posted August 31, 2012 Removing the "*.*" option will not remove the user's ability to show all files, and execute potentially unsafe programs. Just try entering "*" in any file dialog, and you'll all the files, no matter what the currently selected filter is. What you really want, is a way to lock down program execution on Windows. That is actually possible. It seems to be called Software Restriction Policy (SRP). Read about it on, for example, MS Technet. Tx I will give it a try! Quote Link to comment
boochbrain Posted May 29, 2013 Report Share Posted May 29, 2013 It has been a while since this topic was active. I have a similar issue where I'm using the file dialog (express VI) in LV 2012 and I want to limit the user to selecting a *ini file type. If they choose a different file type, it will cause an error in the program. Has anyone come up with a good solution for this? Is there a better way to do this in 2012? Quote Link to comment
todd Posted May 29, 2013 Report Share Posted May 29, 2013 If it's just the file type, put the file dialog express VI in a loop and check for a valid extension. I believe the original problem was that, once the file dialog was open, another pattern could be selected - which allows a user to double-click on an .exe file. In 2012, you can right-click on another file and select "open", and it will execute after the file dialog is done. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.