Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 8:16 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Docview:Changing BrowserFlag in Registry to open Word 2007
PostPosted: February 20th, 2008, 5:10 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi

I would appreciate opinions on whether it is appropriate to use a registry script (.reg) to allow users who have Word 2007 on a Vista machine to view DOC and DOCX files in docview in a pub.

MS has a work-around: http://support.microsoft.com/kb/927009 to chnage the browser flags to allow these files to be opened in a separate windows. So, if a registry file (.reg) were added/installed to a pub's publication folder and a launch file action added, this script could be run. And, using the default browser flag dword settings in a separate .reg file's script could feasibly be used to reverse the change, by running that .reg file using a different launch file action.

A way to include these .reg files would be to add them to a set up package. Optionally, they could even be run at install if Vista and Word 2007 were detected, and the reverse .reg file could be run at uninstall. Plus these actions could be summoned by buttons in the pub, as well.

An alternative is to point the user to a registry utility like filetypeman by nirsoft that can make the same changes by using the program's dialog box to edit the browser flags.

A sample from the MS fix is:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Word.Document.8]
"BrowserFlags"=dword:80000024

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Word.Document.12]
"BrowserFlags"=dword:80000024

Copied into Notepad, saved as FileName.reg and then run will change the registry's browser flags for DOC and DOCX in this case.

To reverse:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Word.Document.8]
"BrowserFlags"=dword:8000002c

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Word.Document.12]
"BrowserFlags"=dword:0000002c

(I did try the scripts to change and reverse the flag for DOC without incident, summoning it as a launch file from a test pub.)

However, I am mindful of the MS warnings about changing the registry, possible problems, and wonder what forum colleagues would suggest about using this or not as a potential solution in a pub.

Kind Regards,

_________________
Stephen


Top
 Profile  
 
 Post subject:
PostPosted: February 22nd, 2008, 1:32 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Stephen,

Quote:
I would appreciate opinions on whether it is appropriate to use a registry script (.reg) to allow users who ...

Well, here's a few thoughts. Consider them as 'opinion' 90%, facts 0%, and filler 10%.

First I'd consider the customer. If it is a corporate or institutional customer, then there's some benefit in doing some legwork to get sys admin's on board with the approach. Maybe even have them test... with a goal that they are prepared to support the program and be first line of call to rush to the user's PC.

Might be good to have a 'battlefield handbook' for admins, and some forewarning plus instructions for end-users. Are there any security issues to be aware of?

Second, is how effective and fool-proof can this 'executed code/control' be? I think you said the Regis-tweak would be initiated on Pub install and reversed on Pub uninstall. What if there's an incompatibility, then the only recourse is uninstall? Worse, what if Pub and PC run okay until user installs some other program or plug-ins, Windows updates? Who will remember that an Opus Pub did this registry modification?

...continuing. Would it make sense to modify and reverse the registry settings upon Launch, and exit, of the Pub? That way keeping the configuration more confined to when it's needed.

Also... I didn't pick up what specific registry values get reinstated. Were these MS 'fixed' values. If you read the registry to pick up 'current' values and save them somewhere... is it possible other PC admin actions or updates would set those keys to yet some other values other than original fixed defaults or the patched-values? (and resetting them to fixed defaults might overwrite more 'current' settings?). What would be the effect of Windows Restore Points?


Back on type of Users. If you have direct end-customers, I'd either work to make this fool-proof or I'd steer clear. If for no other reason than the level of support required... from low-level hand-holding, to potentially down systems and irate users. At a minimum, have a 'real' uninstaller that executes the 'reversal' process.

Maybe even provide to either type of customer... a separate .exe or (a preset/automated) configuration utility that could be run separate from Opus pub. (and even called from Opus pub?).


As an aside, I'm wondering if Flashpaper mentioned in earlier posts would circumvent the need for this? In your case though, you needed to view user-generated Doc/Docx that are not distributed with the pub, right?

Good luck. Hope this progresses well.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject:
PostPosted: February 22nd, 2008, 1:51 am 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Thanks, Lar_123 for your thoughtful suggestions. Not having developed a pub that would potentially need to alter the browser flags in each user's registry, I appreciate the complexity as well as the many issues that can come up and go wrong.

I was hoping that simply adding the launchable scripts (one to make the change and one to reverse it), giving the user 'fair warning' and the option to use them or not, would be enough.

One issue that your ideas raises is the possibility that the 'reverse' script's code may work on my machine but not on other computers.

All in all, probably too much difficulty, potential to go wrong to continue along these lines. I'll try another solution to provide for the user to view their own DOC/DOCX files if they have Word 2007 on a Vista OS. Or, not even provide this option.

Again, thanks for the detailed discussion.

Kind Regards,

_________________
Stephen


Top
 Profile  
 
 Post subject:
PostPosted: February 22nd, 2008, 6:06 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Stephen,

Didn't mean to scare you off your course. Don't abandon the idea just yet. Let some others chime in. Especially since I am not speaking from experience, and haven't gone down that path myself. But it is a pivotal topic for future of some Opus work... hate to see the DocView door closed. (I think there was a similar issue with embedded Browser now, though perhaps the technical nature of that obstacle is different than Docview.)

You might search other support sites around that MS suggestion... see if you can gain a level of confidence as to how smooth or how risky that registy tweak would be for the installed base.
A couple I've bkmarked for ref are:
www.windowskb.com
microsoft1.groupbrowser.com
others....

Lar

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject:
PostPosted: February 22nd, 2008, 7:20 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Had an afterthought.

Will such a registry modification and reversal work if user does not have admin privileges? :?: :?
am just posing the question to cover that base.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject:
PostPosted: February 22nd, 2008, 8:42 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
My two cents (about five pence :-)) worth,

I'd agree with Lar's issues and suggestions. I doubt, and seriously hope, that a non admin would have any write access to the local_machine branch!

I personally would be very septical of running a .reg file to alter the registry for two reasons. One it leaves the program easily open to abuse - somebody could distribute your program, under your name with a modified file and two - it doesn't seem very professional - IMHO - as programs can normally manipulate the regisitry within their own coding.

Opus however, cannot write DWORDs :-( but that isn't to say that you couldn't use a DLL that couldn be passed the required information to write. You could then establish at startup whether the user has the wrong flags and advise them as to the next course of action. Also include a setttings area to reset the flags to a previous stored value.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: February 22nd, 2008, 1:40 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi

Thanks for these additional thoughts.

Lar_123: the issue is one that Opus users may encounter again, since docview is a valuable tool, and MS, in its never-ending quest for security, will unintentially create issues for, like the browser flags no longer easily accessible as they were in XP. A repository of solutions on the forum could help.

Mack: I had also begun to think about a DLL. Has anyone seen a redistributable DLL, of the type that Opus can use, that could tweak a user's registry? I just wrote to the developer of filetypesman (nirsoft.net) to inquire about a DLL and will update if they respond.

Kind Regards,

_________________
Stephen


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 41 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group