?
Solved

login script for MS photo editor

Posted on 2010-09-07
12
Medium Priority
?
334 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
  • 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

Question has a verified solution.

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

I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

839 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