Exchange 2010 hidden folder still visible for users - exchange-server

I have setup an Exchange search folder in users mailboxes under the 'Top of Information Store', and set the PR_ATTR_HIDDEN tag to TRUE.
This works for most of my Exchange 2010 environments. But, for some reason, on some servers (different environments) these folders will remain visible in Outlook for many users (not all).
Question here: what causes the hidden folders to be visible, even with the PR_ATTR_HIDDEN tag set to true.
Please advice :)
Thank you,
Daniel

You should create the folder in the root, rather than under "Top of Information Store" if you want to be sure the user never sees it. Using the PR_ATTR_HIDDEN property relies on the client to honor it, so it isn't fool-proof.

Related

Powershell Script to Create Outlook 2019 Personal Folder

Currently users have their own inbox folder and due to corporate policy emails will automatically be deleted after a set period of time.
Some emails however users would like to be able to keep for reference.
In order to accomplish allowing users to keep their importasnt emails; a personal folder file .pst needs to be created. The deletion policy will on affect the exchange profile folder that they currently use. This special personal folder should not be touched by the corporate system.
I need to be able to run a powershell script to automatically create this folder for the user (logged in user on the computer) and assign it in outlook 2019 for use, the user will then copy their specific emails into that personal folder. If I can't do it for the current logged in user - then by a collection of usernames and put in their one drive folder ??
Anyone with knowledge of how to or code to do this, I would appreciate your help - while I can code - I'am not a Powershell Guru so specifics and functions that experts might know exactly - I do not know, so please in your answer provide good guidance.
I am using windows 10 .1909 and the powershell version that ships with it.
The Outlook object model provides the AddStoreEx method which adds a Personal Folders file (.pst) in the specified format to the current profile.
Sub CreateUnicodePST()
Dim myNameSpace As Outlook.NameSpace
Set myNameSpace = Application.GetNamespace("MAPI")
myNameSpace.AddStoreEx "c:\" & myNameSpace.CurrentUser & "\.pst",olStoreUnicode
End Sub
After creating additional storage in the Outlook profile users can move items for keeping them locally. Or you may consider creating a VBA script or COM add-in for doing that programmatically. See Walkthrough: Create your first VSTO Add-in for Outlook for getting started quickly.

Sandbox Issue: Loading a Movie automatically when a document is loaded

I have a somewhat unique situation, and while I understand what the problem is, I'm not quite sure what the best workaround may be so I thought I would consult the hive mind. :)
Scenario:
I am working on an application (OS X) that is document based and uses Quicktime. When a new document is created, the user selects a movie to view within the document window. The user can then save this document. When the user later attempts to open the document, nothing happens. It just doesn't open.
What I know so far:
The problem is with the way Sandbox operates, and my limited experience working with it (my first attempt.) I have enabled Sandbox and have the app permissions set to allow any user initiated file operations, and also added permissions for the app to access the Movies folder.
When the user loads a document and the Movie is in the Movies folder, it opens and works correctly. However, if the Movie is anywhere else on the users drive, it does NOT work and performs as described above.
I realized this is because while the user can open the document (user initiated), sandbox is blocking the application when it attempts to then open the linked movie automatically (NOT user initiated) unless the movie is located within the Movies folder.
Since the application is designed to work with large files, it seems like a big limitation to force users to copy the files into their movie folder and leave them there.
(I have not yet tried working with a movie located on an external drive, but suspect that it would work as it's not a system drive.)
Question:
Is there a way to work around this, since the user initiated the task of opening the movie originally?
If not, is there perhaps a way to have the application ask the user to confirm that the movie should be loaded... perhaps like presenting an OPEN dialog box with the movie already selected so they can just click OK? This might be the best solution.
Another option might be to automatically copy the movie into the Movies folder when the user initially selects it, but again it's not really idea for my situation...
Any thoughts would be appreciated!
As you describe it, your App has privileges to access files within its own container and in the Movies folder. To access arbitrary movie files you have to:
Let the user initiate the access to a file, i.e. when a new document is created the user has to use a file chooser to access a movie file. The privileges of your sandbox are then extended to allow access to the selected file.
Those access rights are temporarily. To persist them over App restarts you have to save and restore the access right via security scoped bookmarks.
Refer to Apples documentation on PowerBox and on Security Scoped Bookmarks
Also Session 710 from WWDC 2013 might be helpful.

How to create Global Address List folder in Outlook programmatically?

I have Outlook plugin (written with Visual C++) which syncs contacts with DAV server (which acts as a replacement to Exchange). Personal contacts are fine but I don't know how to mimic the behavior of Global Address List (GAL).
Ideally, I want to create GAL folder the user will be able to search just like how it happens when Outlook is connected to Exchange. Is it possible at all? Perhaps, it's not possible with Outlook Object Model but still possible with MAPI? Can anybody point me in the right direction on how to start?
I need to support Outlook 2007+ but supporting only the newest versions (for this particular functionality) is an option, too.
Originally, I just synced the entire GAL folder and made it read-only so that Outlook stored the local copy of the entire GAL. This does not work well when the GAL size stretches to thousands of records.
You cannot do that - the address book provider can tell Outlook to only allow searches and never display the actual contents of the container.
You cannot do that with an Outlook folder unless you create your own MAPI store provider: then you can return any data you want depending on what the user is doing.

Adding files to all users 'My Documents' folders in Windows

I am creating an installer (using Inno Setup) for a windows application. The app has initial documents that I need to store in the users 'My Documents' folder.
Here is the issue, I install it as an Admin, but there may be one or many non admin users on that machine. How can i add that same folder to all the possible current (and future user's) My Documents folder?
Here is what i have tried so far-
1) I could try to pick up all usernames - This however, wont work for future user creations :(
2) I have tried to add it to the systems %allusersprofile%\Documents folder. It does not get reflected to individual My Documents folders.
I believe there should be a way, but have been unable to find a clean solution off the internet till now. Can anyone direct me towards the right path?
Mucho Thanks!
There isn't really a construct for this in Windows. You have a few options:
Put the document in some common place (like %allusersprofile%\Documents, or %program files%\yourCompany\yourApp\documents) and create a start menu link/icon that points to either the folder with the documents or the document itself.
Put the document into the Default User documents folder. When a new user is created, their profile is setup to mirror that of the default user. This doesn't help you with current users, but it does help you for users who haven't been created (logged on)
I'd go with option 1 because it's relatively standard and its what your average user is going to expect.
Look at Inno Setup Shell Folder Constants : {commondocs}

InfoPath Form Registration and Case-Sensitive File Path Strangeness: What's going on here?

Recently I had to troubleshoot a very strange issue with a fully-trusted InfoPath 2007 form at a customer site. The form is part of a records management application and users launch the form from within the application.
However, because the form is subject to frequent updates, we store a "master" copy of the form file on the customer's server. Whenever a user launches the form from our application, our software copies the form .xsn file locally to the Application Data folder, registers the local copy, and then launches it. Note that we don't use certificates, which is why we need to programmatically register the form each time it is launched.
This customer was having trouble launching the form from our application on one of their workstations. The logs indicated that the form couldn't be registered on this particular workstation (the form gets registered and opens fine on other workstations, all of which are running Windows XP).
Our software uses the InfoPath.ExternalApplication class to register and launch the .xsn file. The following VBScript reproduced the issue on the problem workstation:
Set infoPathApp = CreateObject("InfoPath.ExternalApplication")
'This line produces a pretty generic "Form template could not be registered" error,'
'with absolutely no details as to *why* it could not be registered.'
infoPathApp.RegisterSolution "C:\Documents And Settings\All Users\Application Data\MyCompanysApp\MyCompanysInfoPathForm.xsn", "overwrite"
The really strange thing that I cannot for the life of me understand is that if I change
"C:\Documents And Settings\All Users\Application Data\MyCompanysApp\MyCompanysInfoPathForm.xsn"
to this:
"C:\Documents And Settings\All USers\Application Data\MyCompanysApp\MyCompanysInfoPathForm.xsn"
Then the form registers fine and the user can then open the form without any issues! Note that the only difference between the working and non-working code is that I changed "All Users" to "All USers" (capitialized the first "S" in "Users").
What the heck is going on here? Why would the casing of the filepath matter at all to InfoPath? What's more, why would the odd-cased version (with "All USers") work while the (obviously more correct "All Users") doesn't?
Also, for what it's worth, the "All Users" folder does appear as "All Users" and not "All USers" in Windows Explorer and in the file properties.
Update
I can only assume that something is different between the two workstations, but I'm at a loss as to what to look for in terms of differences. I realize I haven't provided a lot of details in the question (because I really have no idea what could be causing this behavior), but if anyone has any clues or possible causes, I'd be happy to hear them.
This is a shot in the dark but:
Have you tried clearing the internet explorer cache and rebooting the workstation?
(In IE go to Tools->Internet Options, click Delete..., click Delete all...)
Also clear your InfoPath form cache while you are at it.
InfoPath saves form data in this cache and does not seem to clear it properly. This causes quite a few problems for me where an old file is opened from the cache when it shouldn't be. The change in the path may be causing a cache miss allowing your code to run properly.
If that doesn't work, the next question I would have would be:
Do you have this issue for all users on this workstation, or have you tried it with only one user?

Resources