Page 1 of 2 12>
Topic Options
#176899 - 2007-06-12 12:12 AM Display an HTML page at login?
JohnTodd Offline
Fresh Scripter

Registered: 2007-01-12
Posts: 7
Sorry guys... I looked all over, but I can't figure this one out. I'm sure it's simple, but I have an advanced case of brainlock today.

I just need to open and display a web page (our AUP) upon login.

How is it done?

Thanks in advance.

Top
#176901 - 2007-06-12 12:33 AM Re: Display an HTML page at login? [Re: JohnTodd]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
shell / run iexplorer.exe to the page, or if association is valid then just the URL of the page location should do it.

If you need further assistance let us know.

Top
#176902 - 2007-06-12 01:04 AM Re: Display an HTML page at login? [Re: NTDOC]
JohnTodd Offline
Fresh Scripter

Registered: 2007-01-12
Posts: 7
I was right... I should have known.

Update; I tried both SHELL and RUN and both aren't working for me. If I go to the Windows command line, I pass the url and it works like a champ.

Any help?


Edited by JohnTodd (2007-06-12 01:30 AM)

Top
#176903 - 2007-06-12 02:20 AM Re: Display an HTML page at login? [Re: JohnTodd]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Okay give something like this a try.

 Code:
Dim $Site, $IExplore
$Site = 'http://www.yahoo.com/'
$IExplore = ReadValue('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE','')
RUN $IExplore + ' ' + $Site

Top
#176904 - 2007-06-12 03:40 AM Re: Display an HTML page at login? [Re: NTDOC]
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
run 'cmd /c start http://www.kixtart.org'

(or shell)
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#176917 - 2007-06-12 11:53 AM Re: Display an HTML page at login? [Re: Radimus]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
That should work unless path or association is screwed up. It would also launch the default browser instead of a given one if you wanted a specific one to launch.
Top
#176918 - 2007-06-12 12:17 PM Re: Display an HTML page at login? [Re: NTDOC]
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
and if the machines browser assoc is screwed up, the PC needs to be fixed.

depts that run multiple browsers deserve to be shot
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#176931 - 2007-06-12 05:26 PM Re: Display an HTML page at login? - WARNING! [Re: NTDOC]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
 Originally Posted By: NTDOC
shell / run iexplorer.exe to the page, or if association is valid then just the URL of the page location should do it.

If you need further assistance let us know.


CAUTION!! Launch IE as "iexplore.exe"! Tacking on the extra "r" at the end is not correct, and in fact is how certain viruses are triggered (and hide in plain (pain?) sight this way.) Google "Spy Sherrif" for more info on one example, but use extreme caution accessing the sites.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#176932 - 2007-06-12 06:17 PM Re: Display an HTML page at login? [Re: NTDOC]
JohnTodd Offline
Fresh Scripter

Registered: 2007-01-12
Posts: 7
 Originally Posted By: NTDOC
Okay give something like this a try.

 Code:
Dim $Site, $IExplore
$Site = 'http://www.yahoo.com/'
$IExplore = ReadValue('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE','')
RUN $IExplore + ' ' + $Site



This worked perfectly, and it even taught me a couple of things. Thanks very much!

Top
#176935 - 2007-06-12 07:17 PM Re: Display an HTML page at login? [Re: Radimus]
eriqjaffe Offline
Hey THIS is FUN

Registered: 2004-06-24
Posts: 214
Loc: Arlington Heights, IL USA
 Originally Posted By: Radimus
depts that run multiple browsers deserve to be shot
 Code:
if keyexist("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE") and keyexist("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\firefox.exe")
   ShootDept()
endif

Now somebody just needs to write the UDF. ;\)

Top
#176998 - 2007-06-15 01:04 AM Re: Display an HTML page at login? [Re: eriqjaffe]
JohnTodd Offline
Fresh Scripter

Registered: 2007-01-12
Posts: 7
Thanks for all the help, but I'm still in a pickle.

If I run the script manually by dragging the script to wkix32.exe, NTDOC's script runs just fine. When the script is called from the GPO, my mappings work, my printer distribution works... But the call to the browser doesn't run.

Any ideas?


Here's my script, in case someone wants to critique... pretty basic.

 Code:
SetTime "\\dc1"

CLS
Break off


;---------------------------------------------------------------
;Delete Network Mappings
;---------------------------------------------------------------

Use "*" /delete /PERSISTENT

;---------------------------------------------------------------
;Map Global Network Drives
;---------------------------------------------------------------

? "Mapping Drives"
Use H: "\\nasbox\vol2"
Use I: "\\saturn\vol3"
Use J: "\\nasbox\vol4"
Use K: "\\nasbox\vol5"
Use L: "\\saturn\vol6"
Use N: "\\saturn\vol11"
Use O: "\\saturn\vol8"
Use P: "\\saturn\vol6\PDOXDATA"
Use Q: "\\minerva\AutoCadE"
Use R: "\\nasbox\snap"
Use S: "\\dc1\netlogon"
Use U: "\\nasbox\production"
Use V: "\\Juno\D"
Use Y: "\\nasbox\Network"
Use X: "\\nasbox\users\@userid"
Use Z: "\\minerva\vol1\apps\acad"

;---------------------------------------------------------------
;Map Printers
;---------------------------------------------------------------

	? "Deleting Printers"

	delprinterconnections()

	? "Adding Printers"
  	If AddPrinterConnection ("\\ps\HP1220C") = 0
	? "Added HP 1220C Color Inkjet Printer Connection"
	'Error: ' + @ERROR + ' - ' + @SERROR ?
	EndIf
	If AddPrinterConnection ("\\ps\hp5000") = 0
	? "Added HP5000 Laserjet Printer Connection"
	'Error: ' + @ERROR + ' - ' + @SERROR ?
	EndIf
	If AddPrinterConnection ("\\ps\p7400") = 0
	? "Added Xerox Phaser 7400 Color Laser Printer Connection"
	'Error: ' + @ERROR + ' - ' + @SERROR ?
	EndIf

;---------------------------------------------------------------
;Display AUP
;---------------------------------------------------------------

Dim $Site, $IExplore
$Site = '\\saturn\vol11\aup\motd.htm'
$IExplore = ReadValue('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE','') 
RUN $IExplore + ' ' + $Site

;---------------------------------------------------------------
;Run TrackIt audit
;---------------------------------------------------------------

run 'N:\TrackIt\audit32.exe'

;---------------------------------------------------------------

function DelPrinterConnections()
dim $c,$bk,$conn
$c=0
$bk="HKEY_CURRENT_USER\Printers\Connections"
$conn=enumkey($bk,$c)
while @error=0
$c=$c+0.5
$conn=delkey($bk+"\"+$conn)
$conn=enumkey($bk,$c)
loop
endfunction



Edited by JohnTodd (2007-06-15 01:16 AM)

Top
#177036 - 2007-06-16 03:08 PM Re: Display an HTML page at login? [Re: JohnTodd]
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Don't use SETTIME. SETTIME reuqires elevated prvileges likepower user of the set time privileges, secondly, the proper AD setup would use a time server topography utilizing W32TM services. SETTIME should only be used for Wintendos support.
_________________________
There are two types of vessels, submarines and targets.

Top
#177039 - 2007-06-18 11:16 AM Re: Display an HTML page at login? [Re: Sealeopard]
Saleem Offline
Hey THIS is FUN
*

Registered: 2001-04-11
Posts: 280
Loc: UAE
I was looking for similer issue and found this post

One doubt

Can we make a control over that AUP HTML page and parse the result to acript... some thing like "I Accept" or "I dont" ??

If the user press I dont then script logs them off and record there details.... If they accept log there detailes and script continues...??

is it possible to make some control with those goodies ??
_________________________
“I’ll not change you unless you don’t have intention to change yourself” --H:Quran

Top
#177043 - 2007-06-18 05:42 PM Re: Display an HTML page at login? [Re: Saleem]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Kixforms may be the way you want to go -

http://www.kixforms.org
_________________________
Today is the tomorrow you worried about yesterday.

Top
#178866 - 2007-08-08 11:49 AM Re: Display an HTML page at login? [Re: Gargoyle]
BillBarnard Offline
Starting to like KiXtart

Registered: 2007-03-14
Posts: 141
Loc: Leighton Buzzard, Bedfordshire...
Try this to display Notice.html at logon time for 30 secs. Notice.html is located in the netlogon folder of your domain controllers.

If not exist("@lserver\netlogon\Notice.html")
Return
Endif

Dim $oIE

$oIE = CreateObject("InternetExplorer.Application")

while $oIE.busy
loop

$oIE.Navigate("@lserver\netlogon\Notice.html")

$False = 0
$True = 1

$oIE.height = 400
$oIE.width = 600
$oIE.AddressBar = $False
$oIE.StatusBar = $False
$oIE.ToolBar = $False
$oIE.MenuBar = $False
$oIE.Visible = $True

; Wait for 30 seconds

sleep 30

$oIE.Quit

$oIE = Nothing

Return
_________________________
Bill

Top
#178869 - 2007-08-08 11:59 AM Re: Display an HTML page at login? [Re: BillBarnard]
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
I think you missed a vital point of the (hijacked) post:
 Quote:
Can we make a control over that AUP HTML page and parse the result to acript... some thing like "I Accept" or "I dont" ??


Though not impossible to do with IE it is tricky and you are at the mercy of MS introducing additional security into the APIs which have broken automation in the past.

It is much simpler to do with KiXforms, and the automation / APIs are under community control.


Edited by Richard H. (2007-08-08 12:04 PM)

Top
#178872 - 2007-08-08 12:12 PM Re: Display an HTML page at login? [Re: Richard H.]
BillBarnard Offline
Starting to like KiXtart

Registered: 2007-03-14
Posts: 141
Loc: Leighton Buzzard, Bedfordshire...
That quote wasn't commented on by the original poster of the topic.
I was just helping out with another way to do what was asked.
I didn't want to debate on IE security etc.
I use plain text in a Messagebox to inform my users of information at logon time.

Cheers,

Bill
_________________________
Bill

Top
#179327 - 2007-08-15 12:04 PM Re: Display an HTML page at login? [Re: JohnTodd]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Hi John,

The type of policy you're running will affect if the user sees it or not.

Did you get this going or do you still need assistance.?

Top
#179328 - 2007-08-15 12:09 PM Re: Display an HTML page at login? [Re: NTDOC]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1894
Loc: Hilversum, The Netherlands
also this won't work
 Code:
$oIE = Nothing

Thats VB, in kix it would be
 Code:
$oIE = ""

Top
#179329 - 2007-08-15 12:30 PM Re: Display an HTML page at login? [Re: Arend_]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
True. However KiX will cleanup after itself pretty good without it most of the time, but setting it to do so is probably a better practice

Nice catch there Apronk

Top
Page 1 of 2 12>


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
2 registered (morganw, mole) and 414 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.161 seconds in which 0.104 seconds were spent on a total of 14 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org