|
|
|||||||
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. |
||||||||
|
|
|||||||
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. |
||||||||
|
|
|||||||
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? |
||||||||
|
|
|||||||
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 |
||||||||
|
|
|||||||
run 'cmd /c start http://www.kixtart.org' (or shell) |
||||||||
|
|
|||||||
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. |
||||||||
|
|
|||||||
and if the machines browser assoc is screwed up, the PC needs to be fixed. depts that run multiple browsers deserve to be shot |
||||||||
|
|
|||||||
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 |
||||||||
|
|
|||||||
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! |
||||||||
|
|
|||||||
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. |
||||||||
|
|
|||||||
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 |
||||||||
|
|
|||||||
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. |
||||||||
|
|
|||||||
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 ?? |
||||||||
|
|
|||||||
Kixforms may be the way you want to go - http://www.kixforms.org |
||||||||
|
|
|||||||
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 |
||||||||
|
|
|||||||
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. |
||||||||
|
|
|||||||
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 |
||||||||
|
|
|||||||
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.? |
||||||||
|
|
|||||||
also this won't work Code: $oIE = Nothing Thats VB, in kix it would be Code: $oIE = "" |
||||||||
|
|
|||||||
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 |
||||||||
|
|
|||||||
I have some problems understanding the modified DelPrinterConnections() in JohnTodd's code. I strip a little part from the code: Code: Dim $c $c=0 $c=$c+0.5 $c is a long with value 0 because of $c=0 0.5 (double) is implicit casted to a long with value 0 After the addition ($c=$c+0.5) $c is still a long with value 0 IMHO he should:
|
||||||||
|
|
|||||||
Code: Use X: "\\nasbox\users\@userid" ;should at least be Use X: "\\nasbox\users\" + @userid |