How to check if Windows Address Book or Windows Contacts is installed - windows

Does anybody know where in registry I can check and see if either of these applications are installed on the machine:
Windows address book
Windows Contacts

From Microsoft: I know it says win 95, but the reg is the same.
Internet Mail and News
The Windows Address Book used by Internet Mail and News is located in the Windows folder. The Address Book file is named .wab, where is the name with which you log on to Windows 95. If you do not have a logon name for Windows 95, the default name for the file is UserMPS.wab.
To move the Address Book file, drag the .wab file from the Windows folder to a different location on the hard drive.
To rename the Address Book file, right-click the .wab file, click Rename on the menu that appears, type a new name for the file, and then press the ENTER key.
If you move or rename the address book file, you must update the following registry key to point to the file's new name or location:
HKEY_CURRENT_USER\Software\Microsoft\WAB\Wab File Name\(Default)
NOTE: The Windows Address Book is not designed to be run on a server. If multiple users attempt to access the file, problems may result.

Related

Drive mapping unavailable when added via registry

I want to add drive mapping from my c# app for specific user on remote machine. I'm trying to do it by adding new registry key.
When I add new drive mapping in registry, adding new key in:
HKEY_USERS\< USER >\Network
so, for example, to map \some_path\all under R:\ I make new key:
HKEY_USERS\< USER >\Network\R
with following values:
such added drive is visible when I type
net use
in command line, but it's status is "Unavailable". It becomes "OK" after computer restart(and it's visible in Windows Explorer).
How can I achieve it without restarting computer? What process during restart changes drive status and makes it visible in Windows Explorer?
Or another approach: when i type add drive via:
net use R:\ \\some_path\all
it's immediately available in Windows Explorer and visible after net use command. What net use does beside adding new key to registry(as presented above)?

What is the path of "my computer" folder on windows?

I am working on a C++ windowsform project, using visual Studio IDE.
I use CFileDialog class to ask the user to select a file to open.
It display an usual open file selection windows.
I would like the default folder displayed to be the same as the one accessed when clicked on "My computer", where the harddrives, USB drives, dvd drives etc. are displayed.
I can define default folder by writting its path tolpstrInitialDir member, but I don't find the path for such a folder. I tried "\", "explorer.exe", "", none of them gave me the expected result.
The application will be used by several users, so the solution must not include the user name in the path. i.e "C:\Documents and Settings[user]\Desktop\My Computer" may work but is not correct for my application.
Does anyone know of to define the "root" path of windows (i.e the root of C:\) ?
I searched on SO and internet but maybe I have used wrong keywords because I couldn't find appropriate content.
My Computer is a virtual shell folder that doesn't correspond to any file system directory. There's no file system path that would correspond to that location.
Fortunately, file dialogs do speak "shellese", so you can use the CLSID (not to be confused with the GUID KNOWNFOLDERID or the CSIDL) of the shell folder. Sample in C# Winforms, but really, the only important part is the ::CLSID):
var ofd = new OpenFileDialog();
ofd.InitialDirectory = "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}";
ofd.ShowDialog();
Disclaimer: I couldn't find any relevant documentation for the virtual folder CLSID, or this behaviour of the File dialog. So this is most likely not contractual, and could possibly change in future versions of Windows.
In the explorer, in the search bar copy the address of
This PC
and then select the text
This PC
and paste. Normally we get the
Ce PC ":: {CLSID}"
and then just copy
:: {CLSID}
and paste it wherever we want.
Path should be: C:\Users\UserName\Desktop\Computer.lnk

Opening a CHM file produces: "navigation to the webpage was canceled"

I am trying to open a .chm file.
I downloaded the source, extracted it, and double clicked on Waffle.chm and clicked "Open" but no matter what element in the chm file I click, I get the message:
Navigation to the webpage was canceled.
What you can try:
Retype the address.
What's going on here?
Summary
Microsoft Security Updates 896358 & 840315 block display of CHM file contents when opened from a network drive (or a UNC path). This is Windows' attempt to stop attack vectors for viruses/malware from infecting your computer and has blocked out the .chm file that draw data over the "InfoTech" protocol, which this chm file uses.
Microsoft's summary of the problem: http://support.microsoft.com/kb/896054
Solutions
If you are using Windows Server 2008, Windows 7, windows has created a quick fix. Right click the chm file, and you will get the "yourfile.chm Properties" dialog box, at the bottom, a button called "Unblock" appears. Click Unblock and press OK, and try to open the chm file again, it works correctly. This option is not available for earlier versions of Windows before WindowsXP (SP3).
Solve the problem by moving your chm file OFF the network drive. You may be unaware you are using a network drive, double check now: Right click your .chm file, click properties and look at the "location" field. If it starts with two backslashes like this: \\epicserver\blah\, then you are using a networked drive. So to fix it, Copy the chm file, and paste it into a local drive, like C:\ or E:. Then try to reopen the chm file, windows does not freak out.
Last resort, if you can't copy/move the file off the networked drive. If you must open it where it sits, and you are using a lesser version of windows like XP, Vista, ME or other, you will have to manually tell Windows not to freak out over this .chm file. HHReg (HTML Help Registration Utility) Utility Automates this Task. Basically you download the HHReg utility, load your .chm file, press OK, and it will create the necessary registry keys to tell Windows not to block it. For more info: http://www.winhelponline.com/blog/fix-cannot-view-chm-files-network-xp-2003-vista/
Windows 8 or 10? --> Upgrade to Windows XP.
"unblocking" the file fixes the problem. Screenshot:
Win 8 x64:
just move it to another folder or rename your folder (in my case: my folder was "c#").
avoid to use symbol on folder name. name it with letter.
done.
In addition to Eric Leschinski's answer, and because this is stackoverflow, a programmatical solution:
Windows uses hidden file forks to mark content as "downloaded". Truncating these unblocks the file. The name of the stream used for CHM's is "Zone.Identifier". One can access streams by appending :streamname when opening the file. (keep backups the first time, in case your RTL messes that up!)
In Delphi it would look like this:
var f : file;
begin
writeln('unblocking ',s);
assignfile(f,'some.chm:Zone.Identifier');
rewrite(f,1);
truncate(f);
closefile(f);
end;
I'm told that on non forked filesystems (like FAT32) there are hidden files, but I haven't gotten to the bottom of that yet.
P.s. Delphi's DeleteFile() should also recognize forks.
The definitive solution is to allow the InfoTech protocol to work in the intranet zone.
Add the following value to the registry and the problem should be solved:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp\1.x\ItssRestrictions]
"MaxAllowedZone"=dword:00000001
More info here: http://support.microsoft.com/kb/896054
Go to Start
Type regsvr32 hhctrl.ocx
You should get a success message like:
" DllRegisterServer in hhctrl.ocx succeeded "
Now try to open your CHM file again.
other way is to use different third party software. This link shows more third party software to view chm files...
I tried with SumatraPDF and it work fine.
I fixed this programmatically in my software, using C++ Builder.
Before I assign the CHM help file, Application->HelpFile = HelpFileName, I check to see if it contains the "Zone.Identifier" stream, and when it does, I simply remove it.
String ZIStream(HelpFileName + ":Zone.Identifier") ;
if (FileExists(ZIStream))
{ DeleteFile(ZIStream) ; }
There are apparently different levels of authentication. Most articles I read tell you to set the MaxAllowedZone to '1' which means that local machine zone and intranet zone are allowed but '4' allows access for 'all' zones.
For more info, read this article:
https://support.microsoft.com/en-us/kb/892675
This is how my registry looks (I wasn't sure it would work with the wild cards but it seems to work for me):
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp\1.x]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp\1.x\ItssRestrictions]
"MaxAllowedZone"=dword:00000004
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\HTMLHelp\1.x\ItssRestrictions]
"UrlAllowList"="\\\\<network_path_root>;\\\\<network_path_root>\*;\\ies-inc.local;http://www.*;http://*;https://www.*;https://*;"
As an additional note, weirdly the "UrlAllowList" key was required to make this work on another PC but not my test one. It's probably not required at all but when I added it, it fixed the problem. The user may have not closed the original file or something like that. So just a consideration. I suggest try the least and test it, then add if needed. Once you confirm, you can deploy if needed. Good Luck!
Edit: P.S. Another method that worked was mapping the path to the network locally by using mklink /d (symbolic linking in Windows 7 or newer) but mapping a network drive letter (Z: for testing) did not work. Just food for thought and I did not have to 'Unblock' any files. Also the accepted 'Solution' did not resolve the issue for me.
Moving to local folder is the quickest solution, nothing else worked for me esp because I was not admin on my system (can't edit registery etc), which is a typical case in a work environment.
Create a folder in C:\help drive, lets call it help and copy the files there and open.
Do not copy to mydocuments or anywhere else, those locations are usually on network drive in office setup and will not work.

How does the OS know what to do with a file when the "Open With..." option is selected?

Explanation:
I don't remember about Linux and I don't know about OS X, but in Windows you can right-click a file and select a program to open it. But how does the OS know exactly how to make the program open it? Does it keep track of the "Open file" dialogs the program has? Does the developer have to specify a special event handler or something for these cases?
For Windows, the answer is in the registry. If you're comfortable reading the registry, run regedit.exe on your Windows machine.
Under HKEY_CLASSES_ROOT, you will see a key list of all file types, .doc, .txt, etc. Each of these keys contains a key called "OpenWithList" or "OpenWithProgIds". An application may have a registered "ProgId", also found under HKEY_CLASSES_ROOT, and it can register it's ProgId to the file types it wants to handle in OpenWithProgIds. Otherwise it registers itself in OpenWithList.
In response to the comment to the first answer (cos I don't have enough rep to comment):
You're thinking of DDE, which is a near-enough deprecated technology. The Windows shell executes the application with the selected file as the first parameter.
The Windows Explorer remembers your previous "Open With..." choices based on file extension in the following key:
HKCR\.ext\OpenWithList
Next time you right-click the file, it looks there and build a list of programs you have previously used to open a particular file type.
Say it finds a key named "myapp.exe". It then looks up the application here:
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Applications\myapp.exe
fetches the info where the application is installed. And it goes here:
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\myapp.exe
follows the GUID stored there to find out the display name of the application.
To add to the fun, the primary associated application is in the list as well, also everything in the OpenWithProgIds key and everything in:
HKEY_CLASSES_ROOT\*\OpenWithList
as well as their respective HKEY_CURRENT_USER counterparts.
The resulting list of applications is then made unique, sorted and displayed. On selection the file is started like any other file you click on - i.e.:
C:\path\to\myapp.exe "C:\path\to\the\file.ext"
http://windowsxp.mvps.org/OpenWith.htm
File associations are stored in the Registry in: HKEY_CLASSES_ROOT.
You can manage them graphically by using Windows Explorer: (WinXP)
Click Tools/Options/File Types
Or with the "Default Programs" applet in Control Panel. (Vista)
Just for some nostalgia the rather brilliant Acorn archimedes had a much better system with each file type having a unique type number, with a manufacturer and application code (rather like a MAC address) which was written with the file.
This means you can have different files all called .bak opened by the correct application - unlike the windows case where a new installed app steals the ownership of every exiting file of that type. Autocad is especialy bad for this, registering about 20 file types.
The operating system runs the specified program sending as parameter the path of the file to open.
For example, in C#, if you want to know which file the operating system wants you to open you'll need to do:
class Program
{
static void Main(string[] args)
{
if (args.Length == 1) //The OS wants me to open a file
openSomeFileJustBecauseTheOSWantsIt(args[0]);
}
}

Copying files from XP to Vista in a bach file or command prompt

I am trying to setup a batch file to copy files from my XP laptop
to my Vista desktop on a workgroup network.
But I am getting a Access denied error. Same in a command prompt.
I can copy the files fine using Windows Explorer.
Any ideas please?
Malcolm
I'm assuming you've setup a share on Vista that you are accessing in XP.
In Vista, make the share accessible to everyone anonymously:
Right-click the folder you're sharing, and click Properties.
Click the Sharing tab, then Advanced Sharing
Click Permissions.
Click Add.
Under "Enter the object names to select", type "Everyone" (without quotes).
Click OK.
Select Everyone in the "Group or user names" box.
Under "Permissions for Everyone", check the Allow box for Full Control.
Click OK three times.
You should probably map that share as a network drive on your XP computer.
That should work.
EDIT: I have tested this with the exact same conditions you described, and it worked.

Resources