Make a cookie everytime a user logs onto workstati

Results 1 to 2 of 2

Thread: Make a cookie everytime a user logs onto workstati

  1. #1
    Jason Buck Guest

    Default Make a cookie everytime a user logs onto workstati

    I have figured out a way to make my internal Intranet users renew their cookie everytime they login. I place a batch file in their startup folder so that everytime they login it is run. <BR><BR>---------------Sample of Batch file that runs at login--------- <BR>@ECHO OFF<BR>REM CREATED BY JASON BUCK ON 12.24.1999 TO RUN IE5. DUE TO LONG NAME<BR>REM DIRECTORIES (i.e., C:PROGRAM FILES...) WE COULDN&#039T JUST POINT TO<BR>REM THE .EXE <BR>C:<BR>CD "PROGRAM FILESINTERNET EXPLORER 5"<BR>START IEXPLORE.EXE "http:\wnjinetjoe.asp?&username=%username%"<BR >cd <BR>rem EXIT<BR>----------------------------End Batch File-------------------<BR><BR>This batch file passes the system variable username to the webpage that creates the cookie. This would be great, except IE 5 will not allow me to close the window using the below code without the stupid prompt saying something like the webpage you are view is trying to close. Do you want to close this window YES / NO buttons.<BR>---------------------Code to close window-------------------<BR>&#060;SCRIPT LANGUAGE="JAVASCRIPT"&#062;<BR>objCloseWin = window.setTimeout("closeWin()", 10000);<BR><BR>function closeWin() {<BR> window.close();<BR>}<BR>&#060;/SCRIPT&#062;<BR>-------------------End Code to Close Window---------------<BR>Does anyone know how to answer yes to the Prompt in the Code.<BR><BR>So I tried to write my cookie for my Intranet as follows<BR><BR>-------------------Batch File to Write Cookie--------------<BR>echo WNJCookie &#062; "C:winntprofiles%username%cookies%username%@wnjine t[1].txt"<BR>echo %username% &#062;&#062; "C:winntprofiles%username%cookies%username%@wnjine t[1].txt"<BR>echo wnjinet/ &#062;&#062; "C:winntprofiles%username%cookies%username%@wnjine t[1].txt"<BR>echo 0 &#062;&#062; "C:winntprofiles%username%cookies%username%@wnjine t[1].txt"<BR>echo 1490280448 &#062;&#062; "C:winntprofiles%username%cookies%username%@wnjine t[1].txt"<BR>echo 29653262 &#062;&#062; "C:winntprofiles%username%cookies%username%@wnjine t[1].txt"<BR>echo 2038361552 &#062;&#062; "C:winntprofiles%username%cookies%username%@wnjine t[1].txt"<BR>echo 29294113 &#062;&#062; "C:winntprofiles%username%cookies%username%@wnjine t[1].txt"<BR>echo * &#062;&#062; "C:winntprofiles%username%cookies%username%@wnjine t[1].txt"<BR>-------------------End Batch File to Write Cookies----------<BR><BR>For some reason the WebServer doesn&#039t even recognize this cookie even though it is in the exact format as a cookie that the web server would have wrote.<BR><BR>Any help would be greatly appreciated.<BR><BR>TIA<BR>Jason Buck<BR><BR><BR>

  2. #2
    Rokea Guest

    Default RE: Make a cookie everytime a user logs onto works

    I have searched a lot concerning the prompt of the window on closing... and the responses i got was that it was IMPOSSIBLE to take out the prompt or answer automaticaly.. you can only close (without prompts) windows you opened bu code (<BR><BR>I&#039d just like to point out that netscape and IE dosnt store their cookies in the same places.. are you sure that, by creating cookies like your doing, every users will get it where they need it? (i.e: some users uses IE and some netscape)..<BR><BR>finally.. if your method dosnt work.. maybe you could write an asp script that runs each time your users accesses the intranet pages.. that way you wont get problems with the window closing prompt since the browser will be managed by the user himself..<BR><BR>let me know if you find something else,<BR><BR>Rokea

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts