![]() |
|
|
|||||||
| Petri.co.il is happy to award auglan the title of Most Valuable Member !!! |
| Register | Calendar |
Search |
Today's Posts |
Mark Forums Read |
| Notices |
|
|
How to Open a Intranet Windows Authenticated Website using vbs script?this thread has 9 replies and has been viewed 7153 times
|
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||||||
|
||||||||
|
Hi, everybody!!
I am unable to find method in the web to open a windows authenticated intranet website from vbs script. I'm using simple vbs script code (see bellow) to open this forum website: Code:
Set wshShell = WScript.CreateObject ("WSCript.shell")
Set IE = CreateObject("InternetExplorer.Application")
IE.visible = 1
IE.navigate(http://www.petri.co.il/forums/forumdisplay.php?f=18)
Some times I need to open this site hundred times during work day and it simply drive my nuts ... I want to be able open this site using vbs script while my domain credentials will be provided automatically (of course for personal use only). Last edited by igor7; 7th March 2009 at 23:49.. |
|
#2
|
|||||||||
|
|||||||||
|
Not sure with a script but do you know there is a way of doing through Group Policy and Internet Explorer?
If you go to Tools, Internet Options. Click on the 'security tab' and then highlight 'Local Intranet'. Click on 'Sites' and then 'advanced' and add your intranet web url in to there. Next, click on 'custom settings' at the bottom whilst ensuring 'local intranet' is still highlighted. Scroll to the botom and make sure there is a dot in 'Automatic logon with current username and password, under the logon section. |
|
#3
|
|||||||||
|
|||||||||
|
Have you enabled integrated Windows authentication? Tools -> Advanced -> Enable Integrated Windows Authentication (Under the security padlock icon).
If the intranet site is made the proper way, it supports integrated authentication and no manual logons are needed at all. Ask the intranet maintenance people if this is the case. -vP |
|
#4
|
||||||||
|
||||||||
|
Thank you guys for the replays, but I don't think that IE configuration problem... I think IIS configured to promt username/password for each connection to this web site.
I'm in vacation now till the end of this week, so I can't try what you advised. But even it can be configured trough IE settings it doesn't help me much, because in my work place I use multiple computer station to log in into company network, so I prefer to use username/password prompt rather configure each station I use. That's why I'm searching for the script. |
|
#5
|
|||||||||
|
|||||||||
|
Quote:
As you say, your looking for a way to script it, so hopefully someone can assist with that. |
|
#6
|
|||||||||
|
|||||||||
|
Quote:
-vP |
|
#7
|
||||||||
|
||||||||
|
Quote:
But still as I said I'm use many computer station to log on into company network environment so I prefer have an script rather then configure each station |
|
#8
|
|||||||||
|
|||||||||
|
Quote:
Somebody must know a way of scripting this for you, so hopefully should respond. With a script, you still need to either roll that out through Group Policy or manually run it each time. |
|
#9
|
||||||||
|
||||||||
|
OK, guys. I did some reverse engineering staff and finally I've find solution for my problem! First of all I understand that this is not IIS configuration problem. IIS configured to use Integrated Windows Authentication, so each AD network resource should be accessed without providing username/password. In my case username/password prompt appears because the site I trying to access placed on server in other (trusted) domain. How I know this? Well, when I followed to Virtual advice:
Quote:
Code:
This page is accessing information that is not under its control. This poses a security risk. Do you want to continue? Quote:
Code:
On Error Resume Next
Const HKEY_CURRENT_USER = &H80000001
strComputer = "."
Set objReg=GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings\" _
& "ZoneMap\Domains\mysite.com"
objReg.CreateKey HKEY_CURRENT_USER, strKeyPath
strValueName = "http"
dwValue = 2
objReg.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, strValueName, dwValue
Dim objShell, RegLocate, RegLocate1
Set objShell = WScript.CreateObject("WScript.Shell")
On Error Resume Next
RegLocate = "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\1A00"
objShell.RegWrite RegLocate,"00000","REG_DWORD"
Set wshShell = WScript.CreateObject ("WSCript.shell")
Set IE = CreateObject("InternetExplorer.Application")
IE.visible = 1
IE.navigate(http://www.mysite.com)
P.S. Tools -> Advanced -> Enable Integrated Windows Authentication (Under the security padlock icon). - is checked by default in IE 6 and 7. Last edited by igor7; 9th March 2009 at 07:21.. |
|
#10
|
||||||||||
|
||||||||||
|
could always make sure the username and passwords are stored here C:\Windows\System32\rundll32.exe keymgr.dll, KRShowKeyMgr
thats is how i stopped a sharepoint page from asking me to authenticate to it all the time
__________________
Life's a breeze, so spread your wings and fly baby |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| VBS script to execute script on remote location | chance | General Scripting | 3 | 17th November 2008 12:20 |
| http://intranet/ does not point to our intranet anymore? | JDMils | Windows Server 2000 / 2003 | 4 | 2nd March 2007 01:19 |
| VBS error when running vbs script in a web page | neo3114 | General Scripting | 2 | 21st February 2007 23:37 |
| I want a script to open windows firewall | el_mans | General Scripting | 2 | 30th June 2006 12:48 |
| VBS script problem | slayer7 | General Scripting | 4 | 29th March 2006 21:48 |