THis code oReg=GetObject("winmgmts
gets a handle to  Windows Management Instrumentation which is used to manage
windows, in this case it looking for the object that acceses the registry

impersonationLevel=impersonate

this kets the script have the same security as the user (i think) , you
might get error/ failure if the person logged on to the PC/ workst. does not
have admin rights

The code then accesses the registery and sets Internet explorers home page
to
"c:\iis_test\testpage171.htm"


Justin


> -----Original Message-----
> From: Robertson-Ravo, Neil (REC)
> [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 20, 2002 11:38 AM
> To: '[EMAIL PROTECTED]'
> Subject: [ cf-dev ] VB'ers?!
>
>
> Any decent VB'ers in the house?
>
> anyone know whats up with this code?  It seems to work on certain Windows
> configs but fails on others...
>
> Anyone?
>
>
>
>
> const HKEY_CURRENT_USER = &H80000001
>
> strComputer = "."
> Set StdOut = WScript.StdOut
>
> Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
> strComputer & "\root\default:StdRegProv")
>
> strKeyPath = "SOFTWARE\Microsoft\Internet Explorer\Main"
> strValueName = "Start Page"
> strValue = "c:\iis_test\testpage171.htm"
> oReg.SetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> For human help, e-mail: [EMAIL PROTECTED]
>
>
>
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]


Reply via email to