Is there any way to edit the registry when a web is opened?

  • Thread starter Gordon Cashmore
  • Start date
G

Gordon Cashmore

I don't care if the user is prompted to click OK or some other intervention,
I need it automated that
when a web page is opened, the action is to immediately either edit the
registry, or prompt the user
to select "ok" in some message box so that the action can be performed. If
that message box is linked to
launch a .vbs script or bat file that is OK!

I want the below code to run.....

Thanks

Gordon Cashmore

const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set StdOut = WScript.StdOut

Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")

'Writes the registry Entry to add the flag which removes the checkmark from
Browse in Same Window
strKeyPath = "SOFTWARE\classes\excel.sheet.8"
strValueName = "BrowserFlags"
dwValue = 8
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
 
J

Jim Buyens

I think this would work if you disallowed anonymous
access, logged in using Windows Authentication, and
specified an account that had the necessary authority.
However, this would update the registry on the Web server.

Your code seems to be configuring Microsoft Excel, and I'm
guessing that needs to run on the visitor's PC. I suppose
a Domain Admin account could reach across the network and
modify the visitor's registry, but there are terrible
security risks in setting that up.

I would try to accomplish the objective using a macro in a
downloaded spreadsheet, or something.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*------------------------------------------------------*
|\----------------------------------------------------/|
|| Microsoft Office FrontPage 2003 Inside Out ||
|| Microsoft FrontPage Version 2002 Inside Out ||
|| Web Database Development Step by Step .NET Edition ||
|| Troubleshooting Microsoft FrontPage 2002 ||
|| Faster Smarter Beginning Programming ||
|| (All from Microsoft Press) ||
|/----------------------------------------------------\|
*------------------------------------------------------*


-----Original Message-----
I don't care if the user is prompted to click OK or some
other intervention, I need it automated that when a web
page is opened, the action is to immediately either edit
the registry, or prompt the user to select "ok" in some
message box so that the action can be performed. If
that message box is linked to launch a .vbs script or bat
file that is OK!

I want the below code to run.....

Thanks

Gordon Cashmore

const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set StdOut = WScript.StdOut

Set oReg=GetObject("winmgmts:
{impersonationLevel=impersonate}!\\" &_
 
S

Stefan B Rusynko

May also be able to accomplish this using HTA
See
http://msdn.microsoft.com/library/d...uthor/hta/overview/htaoverview.asp?frame=true




| I think this would work if you disallowed anonymous
| access, logged in using Windows Authentication, and
| specified an account that had the necessary authority.
| However, this would update the registry on the Web server.
|
| Your code seems to be configuring Microsoft Excel, and I'm
| guessing that needs to run on the visitor's PC. I suppose
| a Domain Admin account could reach across the network and
| modify the visitor's registry, but there are terrible
| security risks in setting that up.
|
| I would try to accomplish the objective using a macro in a
| downloaded spreadsheet, or something.
|
| Jim Buyens
| Microsoft FrontPage MVP
| http://www.interlacken.com
| Author of:
| *------------------------------------------------------*
| |\----------------------------------------------------/|
| || Microsoft Office FrontPage 2003 Inside Out ||
| || Microsoft FrontPage Version 2002 Inside Out ||
| || Web Database Development Step by Step .NET Edition ||
| || Troubleshooting Microsoft FrontPage 2002 ||
| || Faster Smarter Beginning Programming ||
| || (All from Microsoft Press) ||
| |/----------------------------------------------------\|
| *------------------------------------------------------*
|
|
|
| >-----Original Message-----
| >I don't care if the user is prompted to click OK or some
| >other intervention, I need it automated that when a web
| >page is opened, the action is to immediately either edit
| >the registry, or prompt the user to select "ok" in some
| >message box so that the action can be performed. If
| >that message box is linked to launch a .vbs script or bat
| >file that is OK!
| >
| >I want the below code to run.....
| >
| >Thanks
| >
| >Gordon Cashmore
| >
| >const HKEY_LOCAL_MACHINE = &H80000002
| >strComputer = "."
| >Set StdOut = WScript.StdOut
| >
| >Set oReg=GetObject("winmgmts:
| {impersonationLevel=impersonate}!\\" &_
| >strComputer & "\root\default:StdRegProv")
| >
| >'Writes the registry Entry to add the flag which removes
| the checkmark from
| >Browse in Same Window
| >strKeyPath = "SOFTWARE\classes\excel.sheet.8"
| >strValueName = "BrowserFlags"
| >dwValue = 8
| >oReg.SetDWORDValue
| HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
| >
| >
| >
| >.
| >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top