Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook - General Queries (http://www.outlookbanter.com/outlook-general-queries/)
-   -   .ps1 attachment preview with text previewer (http://www.outlookbanter.com/outlook-general-queries/82028-ps1-attachment-preview-text-previewer.html)

Craig J. Lindstrom November 20th 08 12:44 AM

.ps1 attachment preview with text previewer
 
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?


David H. Lipman November 20th 08 02:09 AM

.ps1 attachment preview with text previewer
 
From: "Craig J. Lindstrom"

| 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?


It is a PostScript file, not a graphic, and non-native to Outlook.

You will have to save it and view it with PostScript file viewer.

--
Dave
http://www.claymania.com/removal-trojan-adware.html
Multi-AV - http://www.pctipp.ch/downloads/dl/35905.asp



Diane Poremsky [MVP] November 20th 08 02:23 AM

.ps1 attachment preview with text previewer
 
*.ps1 extension is used for powershell scripts. It can be viewed in notepad
and should preview if associated with the text previewer.


--
Diane Poremsky [MVP - Outlook]
Outlook Tips: http://www.outlook-tips.net/
Outlook & Exchange Solutions Center: http://www.slipstick.com

Outlook Tips by email:


EMO - a weekly newsletter about Outlook and Exchange:


You can access this newsgroup by visiting
http://www.microsoft.com/office/comm...s/default.mspx or point your
newsreader to msnews.microsoft.com.


"David H. Lipman" wrote in message
...
From: "Craig J. Lindstrom"

| 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?


It is a PostScript file, not a graphic, and non-native to Outlook.

You will have to save it and view it with PostScript file viewer.

--
Dave
http://www.claymania.com/removal-trojan-adware.html
Multi-AV - http://www.pctipp.ch/downloads/dl/35905.asp



David H. Lipman November 20th 08 03:09 AM

.ps1 attachment preview with text previewer
 
From: "Diane Poremsky [MVP]"

| *.ps1 extension is used for powershell scripts. It can be viewed in notepad
| and should preview if associated with the text previewer.

Alternatively...
http://filext.com/file-extension/PS1


--
Dave
http://www.claymania.com/removal-trojan-adware.html
Multi-AV - http://www.pctipp.ch/downloads/dl/35905.asp



Diane Poremsky [MVP] November 20th 08 03:43 AM

.ps1 attachment preview with text previewer
 
Except the OP says its powershell not post script -


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.


--
Diane Poremsky [MVP - Outlook]
Outlook Tips: http://www.outlook-tips.net/
Outlook & Exchange Solutions Center: http://www.slipstick.com

Outlook Tips by email:


EMO - a weekly newsletter about Outlook and Exchange:


You can access this newsgroup by visiting
http://www.microsoft.com/office/comm...s/default.mspx or point your
newsreader to msnews.microsoft.com.


"David H. Lipman" wrote in message
...
From: "Diane Poremsky [MVP]"

| *.ps1 extension is used for powershell scripts. It can be viewed in
notepad
| and should preview if associated with the text previewer.

Alternatively...
http://filext.com/file-extension/PS1


--
Dave
http://www.claymania.com/removal-trojan-adware.html
Multi-AV - http://www.pctipp.ch/downloads/dl/35905.asp




David H. Lipman November 20th 08 11:28 AM

.ps1 attachment preview with text previewer
 
From: "Diane Poremsky [MVP]"

| Except the OP says its powershell not post script -


| 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.

Oooops, right I missed that :-(


--
Dave
http://www.claymania.com/removal-trojan-adware.html
Multi-AV - http://www.pctipp.ch/downloads/dl/35905.asp



Patrick Reed[_2_] November 20th 08 06:32 PM

.ps1 attachment preview with text previewer
 
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?



Craig J. Lindstrom November 20th 08 11:17 PM

.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?





All times are GMT +1. The time now is 05:09 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com