Wednesday, August 31, 2011

Excel will not open a workbook when double clicking the file or opening an attachment in Outlook.

Had an issue where a user was opening excel files from explorer. Excel would load up, but the workbook would not launch. You could go to File Open and open the file just fine.

We had recreated his profile and made sure that there was nothing wonky in his xlstart folder and yet this issue still kept happening. Well, there is a check box  in  excels options that says something to the effect of disabling other application to access excel. If this is checked you will not be able to have outlook, explorer, or anything else open excel for you when you click on a file.

The problem was that this check box "somehow" got checked. Doing a little poking around on the Internet gave me the following information as well as booting up a test machine to play with it.

Here are the settings in the registry that were set.


Windows Registry Editor Version 5.00


[HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open\command]
@="\"C:\\Program Files\\Microsoft Office\\OFFICE11\\EXCEL.EXE\" /e"
"command"=hex(7):27,00,5d,00,67,00,41,00,56,00,6e,00,2d,00,7d,00,66,00,28,00,\
5a,00,58,00,66,00,65,00,41,00,52,00,36,00,2e,00,6a,00,69,00,45,00,58,00,43,\
00,45,00,4c,00,46,00,69,00,6c,00,65,00,73,00,3e,00,21,00,44,00,65,00,40,00,\
5d,00,56,00,7a,00,28,00,72,00,3d,00,66,00,60,00,31,00,6c,00,66,00,71,00,60,\
00,3f,00,52,00,26,00,20,00,2f,00,65,00,00,00,00,00

Notice the /e at the end, when that is replaced with “%1”, even if the check box in excel is checked to ignore other applications requesting information from DDE, the application will still request the information via dynamic data exchange. If the /e is taken out of the key, excel will open up a document, and a blank workbook will show up, but the file requested will not show up. At least in my testing, it looks like “%1” is the only way to get it to ignore the check box and get the file to come up.
Here is the reg dump for the key being set with “%1”

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Excel.Sheet.8\shell\Open\command]
@="\"C:\\Program Files\\Microsoft Office\\OFFICE11\\EXCEL.EXE\" \"%1\""
"command"=hex(7):27,00,5d,00,67,00,41,00,56,00,6e,00,2d,00,7d,00,66,00,28,00,\
5a,00,58,00,66,00,65,00,41,00,52,00,36,00,2e,00,6a,00,69,00,45,00,58,00,43,\
00,45,00,4c,00,46,00,69,00,6c,00,65,00,73,00,3e,00,21,00,44,00,65,00,40,00,\
5d,00,56,00,7a,00,28,00,72,00,3d,00,66,00,60,00,31,00,6c,00,66,00,71,00,60,\
00,3f,00,52,00,26,00,20,00,22,00,25,00,31,00,22,00,00,00,00,00

It’s hard to tell for sure why this is happening, but some of my researching suggests updates could switch these keys around. Also, I would like to note that on my test machines I was able to use excel just fine with the /e key at the end of the strings, until I checked the check box to ignore other applications. Once that check box was checked, I was unable to open files unless I put in the “%1”.

0_o Just another day in MS land I guess. I would be interested if anyone else has had issues with this.

Thanks!

Thursday, August 25, 2011

Lockdown Internet Explorer 7 Address Bar, Print, and Menu options.

The following screenshot shows that the address bar is disabled, navigation is also disabled, as well as the print buttons and file menu item. These settings are applied by using a custom ADM file in Group Policy.

clip_image002

The following group policy settings should be applied to the servers. These policies will disable any workaround that the user may use to gain access to another website.

Users\Administrative\Templates\Internet Explorer

clip_image004

\Internet Control Panel

clip_image006

\Browser Menus

clip_image008

\Toolbars

clip_image010

ADM file to be added.

CLASS Machine
CATEGORY InternetExplorer7Lockdown
POLICY "IE7 Lockdown Settings"
EXPLAIN !!Help
KEYNAME "Software\Policies\Microsoft\Internet Explorer\Toolbars\Restrictions"
PART !!Addressbar_title DROPDOWNLIST REQUIRED
VALUENAME "NoAddressBar"
ITEMLIST
NAME !!Addressbar_enable VALUE NUMERIC 0 DEFAULT
NAME !!Addressbar_disable VALUE NUMERIC 1
END ITEMLIST
END PART
PART !!NavButtons_title DROPDOWNLIST REQUIRED
VALUENAME "NoNavBar"
ITEMLIST
NAME !!NavButtons_enable VALUE NUMERIC 0 DEFAULT
NAME !!NavButtons_disable VALUE NUMERIC 1
END ITEMLIST
END PART
END POLICY
POLICY "Disable: Printing"
Explain !!Help2
KEYNAME "SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\POLICIES\EXPLORER"
PART !!PrintButton DROPDOWNLIST REQUIRED
VALUENAME "Btn_print"
ITEMLIST
NAME !!PrintShow VALUE NUMERIC 1 DEFAULT
NAME !!PrintHide VALUE NUMERIC 2
END ITEMLIST
END PART
END POLICY
POLICY "Disable: File Menu"
Explain !!Help3
KEYNAME "SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\POLICIES\EXPLORER"
PART !!FileMenu DROPDOWNLIST REQUIRED
VALUENAME "NoFileMenu"
ITEMLIST
NAME !!FileShow VALUE NUMERIC 1 DEFAULT
NAME !!FileHide VALUE NUMERIC 2
END ITEMLIST
END PART
END POLICY
END CATEGORY
[strings]
InternetExplorer7Lockdown="IE7 Settings"
Addressbar_title="Set the IE7 Address bar to:
Addressbar_enable="
Enabled"
Addressbar_disable="
Disabled"
NavButtons_title="
Set the IE7 Navagation buttons to:
NavButtons_enable="Enabled"
NavButtons_disable="Disabled"
PrintButton="Hide Printer button?"
PrintShow="No"
PrintHide="Yes"
FileMenu="Hide File menu?"
Fileshow="No"
Filehide="Yes"
; explains
Help="Enabled: This policy will change registry settings to disable the address bar and navigation buttons IE7."
Help2="Enabled: This policy will allow you to Hide or Show the print button in IE7."
Help3="Enabled: This policy will allow you to Hide or Show the File menu item in IE7."



Issues:

Users will still be able to press CTRL+P to print – I am unable to find a way around this.

Wednesday, August 24, 2011

IE7 Disable toolbar, Navigation Bar and printing via Group Policy and Custom ADM file

The scenario was that a customer needed to lock down IE7 on their plant floors. The application they use to run the machines was a homebrewed application and called IE to open up some documents. The application was presented to the users via Citrix, so it was the only app they could see. Once they would open up the app they were going out and opening documents, then surfing on over to whatever sites they wanted.




They also would try and print recipies or whatever but would end up sending the print job to the wrong printer (there is not a lot of control at the plants to use group policy printing) and screw up label printers or other such devices.




The solution?! Group policy and a custom ADM built to change the registry keys!




Here is the ADM, just copy and paste into notepad and save it with a .adm extension (be sure to change file type to all!!)