Friday, December 13, 2013

Error 0x80070002 occurred while verifying known folder


Server is getting a general Warning message speradically a lot. Its a Warning so not a big deal but it does raise concern.
Here is the error:

- System
  - Provider
   [ Name]  Microsoft-Windows-KnownFolders
   [ Guid]  {8939299F-2315-4C5C-9B91-ABB86AA0627D}
   EventID 1002
   Version 0
   Level 3
   Task 0
   Opcode 0
   Keywords 0x8000000000000000
  - TimeCreated
   [ SystemTime]  2013-12-13T05:30:22.504632600Z
   EventRecordID 6590
  - Execution
   [ ProcessID]  10080
   [ ThreadID]  5392
   Channel Microsoft-Windows-Known Folders API Service
   Computer **********************
  - Security
   [ UserID]  S-1-5-18
- EventData
  hrError 0x80070003
  FolderId {B97D20BB-F46A-4C97-BA10-5E3608430854}
  Path C:\Windows\system32\config\systemprofile\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup 

So yeah a lot of these are happening with various folders.


I was doing some reading and found out that this specific error had to do with some folders missing in a default profile area. One of the readings fixes was, make the missing folders. What a great idea.

There are several easy ways to make the folders:

Use can use the MD, make directory option.

MD "C:\Windows\system32\config\systemprofile\AppData\Roaming\Microsoft\Windows\Start Menu\Programs"

Windows Explorer
Just go to the folder area and make the missing folder. Make sure you make the full path if more than one folder is missing.

Copy the Default profile on the system.
Every system has a profile that it uses as a template for making a new user profile. So I copied it and pasted it in the missing directory. Note: I did not verify that ALL the missing folders where there. I figured since its a warning, I will wait out the log file and see any othere missing folders show up.

Update: welp that didn't work.. Still getting Error

0x80070002 occurred while verifying known folder {b4bfcc3a-db2c-424c-b029-7fe99a87c641} with path 'C:\Windows\system32\config\systemprofile\Desktop'.

and it does exist.

So i did some more digging and ran across this post,,  about how there are 2 system folders in windows 64 bit.. I totally forgot this. So I copied the folders to the SysWOW64. I am thinking this will fix the issue. We shall see.

Tuesday, December 10, 2013

I want to make a single photo public on facebook.


You are a good Facebook user and you have your photo albums not shared out to the public. Good job. Now you share some of them but not EVERYONE can see them. Maybe just friends or friends of friends.

The Solution:

1. Click your "Photos" on Facebook, OR, click the photo you want to share if it's in front of you already, then go to Step 4 if you just opened the picture.
2. Go to "Your Photos"
3. Find the picture to share to the public
4. Now click the "Edit" link.
5. Now click the link beside "Done Editing" .
Then choose what viewing access you want to give.
6. Click done Editing.

Now the share access has been changed.

Wednesday, December 4, 2013

Windows Command-Line Reference A-Z List (not 2012)


Here is nice little list of commands that can be run on windows from the command line. This applies to: Windows 7, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, and Windows Vista.


Some of the commands only work for specific OS's. Example "Freedisk" is a Vista and Windows server 2008 command. So check before you try and use. 

Give me the info for the people of a group.

I started to get where I wanted to go with a previous post of getting user information so I decided to break down some information.

So I ended up with this nice little chunk of code that gave the members of a group.

The Code
dsquery group -samid "AdminsGroup" | dsget group -members

This gives a decent amount of info, but it's basically unusable for normal readable information.

It gives back information something like this "CN=c-hean,OU=USERS,OU=ESF,OU=EN,OU=BIGOU,DC=STUPIDOMAIN,DC=COM".

So I dug into things a little more and came up with this. Let's use the information from the previous script and add  " | dsget user -display" to get the users information.
Read more about  dsget user by going here.

The Code
dsquery group -samid "AdminsGroup" | dsget group -members | dsget user -display

Now it cleans it up and displays the names of the users instead of the full Distinguished Name, like "Smith, Smith".

There is a lot of other information you can get from your script by just changing a couple of the parameters. So for example if you want First Name, Middle Intial and Last Name just change it to this " -fn -mi -ln" instead of "-display". Now it shows "Bob    R    Smith".

The Code

dsquery group -samid "AdminsGroup" | dsget group -members | dsget user  -fn -mi -ln


Please note somethings that this might give you is an error if one of the "users" is  actually a "group" in the group you searched. You will get something like this "dsget failed:CN=Service Desk,OU=GROUPS,OU=ESF,OU=EN,OU=BIGOU,DC=STUPIDOMAIN,DC=COM".
:The object class of the target does not match the one specified on the command
This tells us that the groups "Service Desk" failed to give us the information you are looking for because it is a "group" not a "user".

I am sure there is a way around this but thats for another time.

Outlook Sort Your Emails by Conversation in Outlook 2010


Image from:
I had come across something recently and had to share it.

If you have Outlook 2010 you can set your folders to be in conversation views. With this view you can see emails that are associated to an email. This not only shows emails from the current folder but ANY folder in your email account.

For example if you have a message come in from someone about something and you had filed the previous email about that topic in a separate folder, for organizational purposes, you will see that other email show as a conversation under that incoming message.

It sounds more difficult than it really it is. It is actually VERY easy to do and VERY easy to undo if you don't like it.

 Check it out.

I would do a whole write up on it but why when others have already. Here is a link to a good write up of it.

Monday, December 2, 2013

Gimme all the Groups and their users


I need a list of  all of the user groups from a system and what users are inside of them.

Now I notice that there are not just users, there are users both local and domain, and also possible other groups. The domain part is interesting. Also the groups in a group poses a problem. It doesn't give me the user.


Well of course there were problems.
a. The servers i needed to talk to are locked down tighter than Uncle Scrooges coin purse. So no getting the information remotely. 

The resolution 1:

Make a script to export this information. I ultimately ended up using VBScript as i usually end up doing for these types of scripts. After some googling and stitching together of some code I ended up with this. It is a script that dumps a tab delimited text file to your desktop of all the groups with their users/groups listed. 

The Code 1:

'Set the var objShell to run shell commands against
Set objShell    = CreateObject("WScript.Shell")

'Set the var userProfilePath using previous shell variable to get the users profile path
userProfilePath = objShell.ExpandEnvironmentStrings("%UserProfile%")

'Set the var wshNetwork to equal the network object
Set wshNetwork  = WScript.CreateObject"WScript.Network" )

'Set the var strComputerName as the computers name using the previous network object var
strComputerName = wshNetwork.ComputerName

'Set where to dump th txt file too.
outFile  = userProfilePath & "\desktop\output1.txt"

'Create the file the "true" flag is there to overwrite the file if it exists.
Set objFile = objFSO.CreateTextFile(outFile,True)

'Create variables to be used later
Dim host
Dim group
Dim member

'Set the host, computer name, to be used to look up the. Since i do not have network access I just use localhost.
host = "localhost"

'Loop through the results of GetObject to get all the "groups"

For Each group In GetObject("WinNT://" & host)

If group.Class = "Group" Then

'Loop through the members of that group to get a list of the members
  For Each member In group.members

'write the computer name, group and its members to the txt file. 
   objFile.Write strComputerName & vbTab & & vbTab & & vbCrLf

'Go to the next member till no more members in that group

'End the if statement if  the group class is not a group class type.
End If

'End the loop of  all the class objects.

Problems #2?

I need the FULL list of users. Lets see if we can get a list of users from the groups of the groups we just pulled from.. umm.. could this turn into an infinite loop?

Info finding:

So after the "For Each member In group.members" i did some digging after finding some other properties i could dig into.

I am using WScript.Echo member.? to get the information.. so like WScript.Echo member.class

class =  the class of the object, such as; user and group

AdsPath = gives the path of the object..
Formatted like: WinNT://pathName/objectName
Example: WinNT://MyComputer21/Bob

Name = the name of the object.. like the name: Bob

Parent = This one gives where the object comes from.. this i want..
Formated like WinNT://location
Example: Domain = WinNT://MICROSOFT
               Machine = WinNT://MyComputer21