In my app I have an OpenFileDialog with a filter like this: Image Files|*.bmp;*.png;*.gif|All Files|*.*. On my machine the filter in the dialog is displayed as it should be:
Image Files
All Files
But on my boss's machine the filter in the dialog looks like this:
Image Files (*.bmp, *.png, *.gif)
All Files (*.*)
I don't have a single line of code which may change the filter, so I do not understand, why on earth it is displayed this way. What's even more strange is that when I logged into my boss's computer under my account and ran just the same .exe my boss tried it worked like a charm!
Both my and my boss's machine run Windows 7 Enterprise.
My guess is your Windows Explorer settings specify to hide file extensions on your machine, whereas your boss's is configured to show them.
To check this setting:
Open Windows Explorer
Click the Organize dropdown
Select Folder and Search Options
Select the View tab
Look at the list of check boxes under Advanced settings and find Hide extensions for known file types
Related
So, I just started using Android Studio. I am using windows 7 64bit on my main SSD. When I installed the IDE, I have the SDK and Android Studio saved on a secondary drive. Now I noticed that Android Studio added 3 other folders in the "Personal Folder" in my main SSD (.android, .AndriodStudio, .gradle).
Anyone know how to give these guys a different destination so I can save space on my main hard drive?
Copy those folders to wherever you want. But once you copy do the following steps.
1.) Open Windows explorer and right click on computer and select properties. In the control panel home that opened select advanced system settings in the left pane. Then select environment variables under advanced tab in the system properties window.
2.) Add a new user variable with name 'ANDROID_AVD_HOME' and value as path to /.android/avd/
3.) Similarly set GRADLE environment variables. This link might help - http://www.gradle.org/installation
4.) Start Android Studio - it will ask if you want to import config file. Give location to /.AndroidStudio/config
I hope this should work fine.
I have built a Setup with InnoSetup. When I display the properties of the Setup.exe file in Windows Explorer, the first field is "Comments" and it says
This installation was built with Inno Setup.
Since this is one of the first things a user will see on Windows XP (not shown on Windows 7 at all) when looking at the properties, I'd like to change it so that it looks less like InnoSetup but more like my program. However, I could not find a setting for it. How could I modify this text using InnoSetup?
I've already gone through all the VersionInfo* properties of the [Setup] category.
Actually this is strictly forbidden and it is against Inno Setup license policy.
Please do not do this, Inno is free and you are taking credits from it!
What I would like to do is make it so that when a folder is opened (or when the windows folder explorer is opened), either a program/batch file/etc. will run. I have no idea how I could do something like this, so any help and assistants will be greatly appreciated! Thank you.
This is just an idea (but more than a comment could handle).
Windows allows you to attach a thumbnail provider, which will generate thumbnails for files. That's how softwares such as Microsoft Office, LibreOffice, VLC etc. make explorer thumbnails for files.
You can use this API and define a thumbnail provider for a file type invented by you, and put an empty file of that type in your folder. When the user opens the folder, your code will be run to generate the thumbnail, it can thus start another program (the one you want to start) and return a failure code (so that no thumbnail is cached, and the code will be re-run when the user re-opens the folder.
This only works starting from Windows Vista.
I've encountered a strange situation and I cant find any information for why it's keep happenning.
My enviorment: I got couple of terminals servers in my domain. I got all the users profiles stored in a diffrent "Main-server". When a user logs in there is a startup script that runs and copy the icons for the user-desktop to its currnet session from the "Main server". One of this icons is a shortcut to a batch file. The batch file itself is located in each of the Terminals servers, and the path for the shortcut is "C:\1st-dir\2nd-dir\run-script.bat".
The strange situation: When I press right-click on the shortcut and choose "Edit", the batch file itself is openned - no supprises here. I then close the file with no changes but now I see that the path for the shortcut have changed, and it's now go to "\\Terminal-serverX\C$\1st-dir\2nd-dir\run-script.bat". Even thou I got couple of terminals servers, it's keep reffering to the same one. I repeated this on diffrent shortcuts and got the same result.
Anyone know why does this happen ?
Looking closely at your post, the original C: got changed to \\Terminal-serverX\C$ when you used the short-cut.
It sounds like 'automated shortcut resolution' might be going on.
From the Microsoft page Disabling Automatic Network Shortcut Resolution
When you create a shortcut to a resource on a mapped network drive, and then remap the same drive to a different network resource, Windows attempts to connect to the original network resource when you access the shortcut.
Furthermore, when you re-establish the original connection, a different drive letter may be mapped to the original resource. This may cause programs to fail because the expected drive mappings are not present.
(I can't tell from your question what OS you are using, and admitedly that page only refers to Windows 95 and NT - so the details might be slightly different for a newer Windows version, but it does look very much like what you described)
I have a WPF application that is designed for a touchscreen kiosk. Users will not have access to a keyboard or mouse. The application runs fine when started normally from the program icon in windows. However, when it is set up to run automatically at startup (by replacing the Windows shell using a registry key), the application does not function properly.
The application reads an XML file that lists available videos, then displays buttons to show the videos. When run in "kiosk mode," it does not seem to have access to the files in its media directory (the XML file and presumably the videos as well). I suspect that because the application is running in place of the windows explorer, it is missing resources it needs for file access that are normally loaded by windows explorer.
I have not been able to find any info on this - there is plenty of info on how to get an app to run at startup, but not much on how to make sure it will actually function in that environment. The PC is running Windows 7 Professional.
Is my assumption about the problem correct, or is it likely something else (e.g. permissions - we checked the permissions, but maybe they operate differently when you replace the windows shell?) If it is because needed resources are not loaded, does anyone have pointers on how to make sure my app loads them?
Perhaps you have file access occurring via a file dialog? This might explain a bit further. What is the minimum functionality needed to create Shell Replacement for Windows?
because you have stopped windows default running explorer.exe , your program can not get access to default xml directory therefore you should specify the complete path for example like below:
stream = File.Open(#"C:\x86\Debug\xml.xml", FileMode.OpenOrCreate);