Solved

login script for MS photo editor

Posted on 2010-09-07
12
311 Views
Last Modified: 2012-05-10
does anyone have a login script out there that sets jpeg, jpg, jpe, gif, etc to open in MS photo editor?
0
Comment
Question by:ordpeople
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
12 Comments
 
LVL 26

Expert Comment

by:pony10us
ID: 33619607
Take a look at FTYPE:    http://ss64.com/nt/ftype.html
0
 
LVL 8

Expert Comment

by:pvlier
ID: 33619609
You need to edit the registry. You could do that by silently importing a reg file with the correct data. For example to set .jpg file:
- create reg file with this info (you can set info in regedit and then export and filter needed info):
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\jpegfile\shell\Open\command]
@="\"C:\\Program Files\\Common Files\\Microsoft Shared\\PhotoEd\\PHOTOED.EXE\" \"%1\""
"command"=hex(7):43,00,38,00,34,00,44,00,56,00,6e,00,2d,00,7d,00,66,00,28,00,\
  59,00,52,00,5d,00,65,00,41,00,52,00,36,00,2e,00,6a,00,69,00,50,00,68,00,6f,\
  00,74,00,6f,00,45,00,64,00,69,00,74,00,6f,00,72,00,46,00,69,00,6c,00,65,00,\
  73,00,3e,00,44,00,6f,00,54,00,5d,00,6a,00,49,00,7b,00,6a,00,66,00,28,00,3d,\
  00,31,00,26,00,4c,00,5b,00,2d,00,38,00,31,00,2d,00,5d,00,20,00,22,00,25,00,\
  31,00,22,00,00,00,00,00

- save this in the netlogon folder as 'fileasso.reg"
- add line to logon script: regedit /s \\<servername\netlogon\fileasso.reg
0
 

Author Comment

by:ordpeople
ID: 33620395
could this be placed in HKCU?  I am looking for just two users to be able to open in photo editor.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 26

Expert Comment

by:pony10us
ID: 33620507
That depends on the version of Windows you are using:

http://support.microsoft.com/kb/257592
0
 

Author Comment

by:ordpeople
ID: 33621627
W2k3 SP2, I see that:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\jpegfile\shell\Open\command]
@="\"C:\\Program Files\\Common Files\\Microsoft Shared\\PhotoEd\\PHOTOED.EXE\" \"%1\""
"command"=hex(7):43,00,38,00,34,00,44,00,56,00,6e,00,2d,00,7d,00,66,00,28,00,\
 59,00,52,00,5d,00,65,00,41,00,52,00,36,00,2e,00,6a,00,69,00,50,00,68,00,6f,\
 00,74,00,6f,00,45,00,64,00,69,00,74,00,6f,00,72,00,46,00,69,00,6c,00,65,00,\
 73,00,3e,00,44,00,6f,00,54,00,5d,00,6a,00,49,00,7b,00,6a,00,66,00,28,00,3d,\
 00,31,00,26,00,4c,00,5b,00,2d,00,38,00,31,00,2d,00,5d,00,20,00,22,00,25,00,\
 31,00,22,00,00,00,00,00
works but not under HKCU.
0
 
LVL 26

Expert Comment

by:pony10us
ID: 33621733
From the site I pointed you to:

"Currently, there is no way through the UI to change or edit the user-specific file type associations stored in the HKEY_CURRENT_USER\SOFTWARE\Classes registry key. If you want to do this, you have to directly edit the registry or develop your own UI to gain access to this information. "

However, is this how you are trying to put it in HKCU?

[HKEY_CURRENT_USER\jpegfile\shell\Open\command]
@="\"C:\\Program Files\\Common Files\\Microsoft Shared\\PhotoEd\\PHOTOED.EXE\" \"%1\""
"command"=hex(7):43,00,38,00,34,00,44,00,56,00,6e,00,2d,00,7d,00,66,00,28,00,\
 59,00,52,00,5d,00,65,00,41,00,52,00,36,00,2e,00,6a,00,69,00,50,00,68,00,6f,\
 00,74,00,6f,00,45,00,64,00,69,00,74,00,6f,00,72,00,46,00,69,00,6c,00,65,00,\
 73,00,3e,00,44,00,6f,00,54,00,5d,00,6a,00,49,00,7b,00,6a,00,66,00,28,00,3d,\
 00,31,00,26,00,4c,00,5b,00,2d,00,38,00,31,00,2d,00,5d,00,20,00,22,00,25,00,\
 31,00,22,00,00,00,00,00
0
 
LVL 26

Expert Comment

by:pony10us
ID: 33622232
An example of yusing ftype would be:

ftype jpegfile="C:\Program Files\Common Files\Microsoft Shared\PhotoEd\PHOTOED.exe" "%1"

You can find out what to use for each (if they are already set) by doing:

ftype | more

You can then scroll through and find each and make a text file with the current settings so that it would be easy to revert back.
0
 

Author Comment

by:ordpeople
ID: 33622386
I have been trying a couple registry hacks:
[HKEY_CURRENT_USER\Software\Classes\jpegfile]
@="\"G:\\Program Files\\Common Files\\Microsoft Shared\\PhotoEd\\PHOTOED.EXE\" \"%1\""
also
[HKEY_CURRENT_USER\SOFTWARE\Classes\jpegfile\shell]

[HKEY_CURRENT_USER\SOFTWARE\Classes\jpegfile\shell\Open]
@="&Open"

[HKEY_CURRENT_USER\SOFTWARE\Classes\jpegfile\shell\Open\command]
@="\"G:\\Program Files\\Common Files\\Microsoft Shared\\PhotoEd\\PHOTOED.EXE\" \"%1\""
"command"=hex(7):31,00,30,00,21,00,21,00,21,00,67,00,78,00,73,00,66,00,28,00,\
  4e,00,67,00,5d,00,71,00,46,00,60,00,48,00,7b,00,4c,00,73,00,50,00,68,00,6f,\
  00,74,00,6f,00,45,00,64,00,69,00,74,00,6f,00,72,00,46,00,69,00,6c,00,65,00,\
  73,00,3e,00,44,00,6f,00,54,00,5d,00,6a,00,49,00,7b,00,6a,00,66,00,28,00,3d,\
  00,31,00,26,00,4c,00,5b,00,2d,00,38,00,31,00,2d,00,5d,00,20,00,22,00,25,00,\
  31,00,22,00,00,00,00,00

[HKEY_CURRENT_USER\SOFTWARE\Classes\jpegfile\shell\Print]
@="&Print"

[HKEY_CURRENT_USER\SOFTWARE\Classes\jpegfile\shell\Print\command]
@="\"G:\\Program Files\\Common Files\\Microsoft Shared\\PhotoEd\\PHOTOED.EXE\" /p \"%1\""
"command"=hex(7):31,00,30,00,21,00,21,00,21,00,67,00,78,00,73,00,66,00,28,00,\
  4e,00,67,00,5d,00,71,00,46,00,60,00,48,00,7b,00,4c,00,73,00,50,00,68,00,6f,\
  00,74,00,6f,00,45,00,64,00,69,00,74,00,6f,00,72,00,46,00,69,00,6c,00,65,00,\
  73,00,3e,00,44,00,6f,00,54,00,5d,00,6a,00,49,00,7b,00,6a,00,66,00,28,00,3d,\
  00,31,00,26,00,4c,00,5b,00,2d,00,38,00,31,00,2d,00,5d,00,20,00,2f,00,70,00,\
  20,00,22,00,25,00,31,00,22,00,00,00,00,00

[HKEY_CURRENT_USER\SOFTWARE\Classes\jpegfile\shell\printto]

[HKEY_CURRENT_USER\SOFTWARE\Classes\jpegfile\shell\printto\command]
@="G:\\PROGRA~1\\COMMON~1\\MICROS~1\\PhotoEd\\PHOTOED.EXE /pt \"%1\" \"%2\" \"%3\" \"%4\""
but don't seem to be getting anywhere.
0
 

Author Comment

by:ordpeople
ID: 33622415
currently ftype reveals that jpegfile is associated with opening in IE which is how I want it for every user that logs onto the server, but want two users to be able to open in MS photo editor.
0
 
LVL 26

Accepted Solution

by:
pony10us earned 500 total points
ID: 33622555
1. Copy the line currently shown by ftype to a text file.
2. Add ftype to the begining of the line
3. Copy the line:  ftype jpegfile="C:\Program Files\Common Files\Microsoft Shared\PhotoEd\PHOTOED.exe" "%1" to the text file

Since your original question was about doing this in a login script then you can place an if %username% line in the login script. I haven't tested this

if "%username%"=="user b" (
ftype jpegfile="C:\Program Files\Common Files\Microsoft Shared\PhotoEd\PHOTOED.exe" "%1"
goto cont:
)
if "%username%"=="user b"(
ftype jpegfile="C:\Program Files\Common Files\Microsoft Shared\PhotoEd\PHOTOED.exe" "%1"
goto cont:
)
 <ftype line from your text file wil the original association settings>
cont:
    rest of script

0
 
LVL 26

Expert Comment

by:pony10us
ID: 33622561
The first if should be for "user a" instead of both being "user b"   oops!
0
 

Author Closing Comment

by:ordpeople
ID: 37280040
ended up abondaning script because client moved on, but this helped us go down the path towards resolving it.
0

Featured Post

Raise the IQ of Your IT Alerts

From IT major incidents to manufacturing line slowdowns, every business process generates insights that need to reach the people required to take action. You need a platform that integrates with your business tools to create fully enabled DevOps toolchains.

You need xMatters.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Batuhan Cetin Within the dynamic life of an IT administrator, we hold many information in our minds like user names, passwords, IDs, phone numbers, incomes, service tags, bills and the order from our wives to buy milk when coming back to home.…
Scenerio: You have a server running Server 2003 and have applied a retail pack of Terminal Server Licenses.  You want to change servers or your server has crashed and you need to reapply the Terminal Server Licenses. When you enter the 16-digit lic…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question