Hiding View All Site Content and Recycle Bin in SharePoint 2010

I found a lot of resources online that explain many different ways of doing this, lots of comments saying it worked for them, none of which worked for me.  I even found a tutorial online that explained how to do this using a custom permission, which works, but not when the same users have to have different permissions to underlying objects in the site.  So here’s a method that works at the Master Page level, is customizable, and doesn’t affect all underlying objects whether inherited or not.

Open up the desired site in SharePoint Designer and look in your Master Pages.  Locate your desired master page (mine is v4, like most others).  Many sites say not to alter the master page itself, but to make a copy.  You can do that…..or revert to a previous version if you make a mistake.  Open the file, then click Edit File.

Look for the following element in the code:



Above the bold section, add the following line of code:

Change the blue PermissionsString value to whatever you want.  Multiple permissions can be separated with a comma (no spaces).  Note it should be a permission your target user(s) do not have, and has to come from this list.  Spelling and case-sensitivity is important.  Finally, add the closing tag after the SharePoint:UIVersionedContent closing tag:



Save your changes and test the results.  Those with the correct permissions should be able to see the Recycle Bin and View All Site Content elements in the quick launch area at the bottom, everyone else should not.

Note: This WILL NOT remove View All Site Content from the drop down menu under Site Actions.  To remove View All Site Content from the Site Actions drop down, in the same master page, go up towards the top and look for the following element:

Start scrolling through the MenuItemTemplate elements underneath this one, and look for the one with the id of “MenuItem_ViewAllSiteContents”.


Change the value to be whatever you set it to in the previous code segment above and save your changes.

Hope this helps!

Eric

Eric Oszakiewski is a professional software developer based in Scottsdale, AZ with over 35 years of IT experience, and 19 years Native American Gaming experience. He is currently working as a Sr .Net/SharePoint Developer for General Motors, and also as a consultant.

More Posts - Website

Follow Me:
TwitterFacebookLinkedInGoogle PlusYouTube

Windows 8 on HP Pavilion dv7 laptop

I’m going to keep track of installs and changes here, in an effort to prepare for the Windows 8 public release to help others support their installs on their machines.  In my case, I’m installing Windows 8 on a VHD on the local HD, then booting to that VHD instead of my core OS.  This way I’m allocating 100% of my system hardware exclusively to that VHD as a partition.

Machine Specifications
HP Pavilion dv7 laptop
AMD Phenom II P860 Triple Core i5, 2.0GHz
6GB RAM
720GB Hard Drive
Windows 7 SP1 core OS

Windows 8 Developer Preview
Improved boot time, lowered processor usage and RAM allocation, fan spins high and continuously.

Windows 8 RP
Same as above, and fan continues to spin continuously.  A lot of heat is being thrown out of the left side vents, chassis getting hot on the left side.  Modifying advanced power settings to adjust maximum processor usage makes no difference.

Windows 8 RTM
Same as Windows 8 RP, still having fan issues despite advanced power settings, stopping services/processes, etc.

Eric

Eric Oszakiewski is a professional software developer based in Scottsdale, AZ with over 35 years of IT experience, and 19 years Native American Gaming experience. He is currently working as a Sr .Net/SharePoint Developer for General Motors, and also as a consultant.

More Posts - Website

Follow Me:
TwitterFacebookLinkedInGoogle PlusYouTube

Creating a VHD for multi-boot in Windows 7

Been doing this so much lately with all of the flavors of Windows 8, I figured I’d write this down for my own benefit, but also for anyone who’s interested in doing the same.

  1. Create a new VHD
    1. Go to Start, right-click on Computer and choose Manage
    2. Under Storage in the left pane, single-click Disk Management
    3. In the Actions pane on the right, click More Actions, then choose Create VHD
    4. Specify the location you want to store your VHD file (ex: c:VHDsvhdname.vhd).  Select the virtual hard disk size (I typically do 20GB and Fixed, but it’s up to you) and click Ok.
    5. The VHD will be created, this can take anywhere from 5-20 minutes.
    6. Once finished, you need to initialize the disk.  Right-click on the newly created Disk in the pane below the volumes list (click the left side of the disk, not the white area on the right) and choose Initialize Disk.
    7. Make sure MBR is selected and click OK.
    8. You should now have a VHD, ready for installation of your favorite OS.
  2. Prepare your bootable OS
    1. Download and install the Windows 7 USB DVD Download Tool.  This is a free tool courtesy of Microsoft, and is very handy (IMHO) for creating bootable flash drives for OS installation.
    2. Once installed, run the tool.  In step 1, browse to the location of the ISO file for your OS you want to install on the newly created VHD.
    3. Choose the media type you want the bootable drive created on.  For me, this is a blank flash drive, minimum 8GB.  At this point, the drive should be connected.
    4. Make sure your drive is selected in the drop down list.  If you forgot to connect it, connect it now and click Refresh.  Click Begin Copying.
    5. In step 4, the drive will be formatted, the OS will be installed on the drive, and it will be configured to be bootable.
    6. You should now have a bootable media with your desired OS on it.
  3. Install your OS on your VHD
    1. Plug in your flash drive and restart your machine.  Make sure your machine’s BIOS is set to read flash drives on boot, and also that any VM settings are enabled.
    2. Follow the on-screen instructions for installation of your OS.
    3. When you get to the point where it wants to know which partition to install the OS on to, press SHIFT+F10 to open the command prompt.
    4. Type DISKPART and hit enter
    5. At the DISKPART> prompt, type select vdisk file=<path to vhd file> and hit enter.  NOTE: drive letters may have been rearranged during this install process.  You may need to do some searching around at the various drive letters to find your VHD file, to make sure you have the correct drive letter and path above.
    6. At the DISKPART> prompt, type attach vdisk and hit enter
    7. Close the command prompt window
    8. At the list of available partitions, click Refresh, and make sure your VHD file appears in the list.  If it doesn’t, repeat steps C-F and make sure there are no errors when attaching the VHD to the install session.
    9. Select the VHD partition and proceed with installation.  Ignore any warnings the wizard may tell you about not being able to install on this partition.
    10. A BCD entry will be created for you, and set to default upon completion.
  4. Changing boot order/default boot settings after installation
    1. Before making any changes to the Boot Control, back it up by typing bcdedit /export <filename> and hit enter.  Don’t use spaces in the filename unless you enclose them in double-quotes.
    2. In your default OS (prior to installing the new OS above), open a command prompt and type bcdedit /enum and hit enter.
    3. To set a specific VHD or partition volume as default, locate the identifier GUID and select it by right-clicking and choose Mark, then select the entire GUID (including curly braces {}) and hit enter.
    4. Back at the prompt, type bcdedit /default {GUID} and hit enter, replace {GUID} with the guid you copied and pasted.  To paste, right click and choose Paste.
    5. To change the default selection timeout, so it’s faster or slower, type bcdedit /timeout x, where x = the number of seconds before it selects the default.  To make it bypass this screen, set the timeout value to 0.
    6. To change the description (name as it appears in the list), type bcdedit /set description <whatever you want it to say> and hit enter.

That’s it, enjoy your new VHD!

Eric

Eric Oszakiewski is a professional software developer based in Scottsdale, AZ with over 35 years of IT experience, and 19 years Native American Gaming experience. He is currently working as a Sr .Net/SharePoint Developer for General Motors, and also as a consultant.

More Posts - Website

Follow Me:
TwitterFacebookLinkedInGoogle PlusYouTube