View Single Post
  #8  
Old November 20th 08, 11:17 PM posted to microsoft.public.outlook
Craig J. Lindstrom
external usenet poster
 
Posts: 2
Default .ps1 attachment preview with text previewer

Thanks,

That did it. That dang level 2!

Craig

"Patrick Reed" wrote in message
...
If you used the Level1Remove Registry entry to unblock this extension, I
don't think it will work. I believe you also have to remove it from the
Level 2 category, otherwise you will still need to save it to disk before
viewing.

What I had to do on my machine to get this to work (quick note - I'm going
with the Registry here, basically manually setting values that would
otherwise be set using a Group Policy):

Close Outlook and verify in Task Manager Outlook.exe is no longer running.

Navigate to
HKEY_CURRENT_USER\Software\Policies\Microsoft\Offi ce\12.0\Outlook\Security
If you don't have this key path under HKCU\Software, you can add each key
manually (rt-click | New | Key).

In the Security key, create a new DWORD value named AdminSecurityMode
Set the value to 3

In the Security key, create a new String value named
FileExtensionsRemoveLevel1
Set the value to PS1

In the Security key, create a new String value named
FileExtensionsRemoveLevel2
Set the value to PS1

At this point, I still couldn't get my test.ps1 file to open with the TXT
Previewer. So, I went he
http://blogs.msdn.com/toub/archive/2...on-editor.aspx
...and downloaded his Preview Handler Association Editor.

Extract the EXE and run it, select Microsoft Windows TXT Preview Handler
from the drop-down list, uncheck the box to only show classes associated
with this handler, and then check the box next to .ps1 in the list.

Once I opened Outlook I was able start previewing my test.ps1 file.







--
-Patrick Reed



"Craig J. Lindstrom" wrote in message
...
How can I get .ps1 files to preview with the built-in text preview
handler. I have unblocked the .ps1 attachments so I can see them (in the
registry) and I have associated the .ps1 extension with the built-in text
previewer but I still get the message "This file cannot be previewed. Try
opening the file in the program in which it was created". I am an
instructor and I have students send their homework in via e-mail. Often
times I like to quickly view the scripts without saving the attachment.
This is not a security risk because you can't execute a powershell script
directly anyway. Any ideas how to solve this one?



Ads