WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Samples from Users
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Use Private Netscape Bookmark and Cookies Files during Session

Keywords:    netscape 

;************				Paranoia Netscape Navigator Launcher
;************
;************ All disclaimers and legal mumbojumbo that are always applied to shareware/freeware apply to this
;************ chunk of code too.  Every effort was made to throughly debug this script before sending it out.
;************ However, I make ABSOLUTELY NO WARRANTEE, EXPRESS OR IMPLIED, as to the operation of this script.
;************
;************ This script modifies the registry.  As with any program which does so, a registry backup should be
;************ performed before running this script for the first time on your computer.
;************ 
;************ This script was written specifically for use with Netscape.  I have never used MS Internet Explorer but
;************ I am sure that the script will need to be modified to work with MS IE.
;************
;************ When executed, this script creates a backup of the bookmark file then replaces the bookmarks with your
;************ personal copy of bookmark file.  After the Netscape session, the "in use" bookmark file is copied to
;************ your personal bookmark file and the original bookmark file is returned to use.  The cookies file, history
;************ file and cache files are deleted and the current user URL History key of the registry is cleared.
;************ 
;************ Special Notes
;************
;************ If Netscape is not installed under C:\Program Files, you will need to change the path.  In the three lines
;************ that deal with MyBkmark.htm (the personal bookmark file), you will need to change XXX to the directory
;************ of your choice.  If you REALLY don't want to take the chance of someone seeing this file, you can use a
;************ floppy instead.  When Netscape is launched, the RunWait command calls a shortcut on the desktop instead
;************ of the executable.  If you do not have a shortcut on your desktop, or if the shortcut name is different,
;************ you will need to change this line.  Once in a great while on my computer, Netscape crashes for no obvious
;************ reason.  If this happens during one of your sessions, all bets are off.  You will probably need to deal with
;************ all of the post-session file copying manually.
;************

LogDisk("C:")
DirChange ("C:\Program Files\Netscape\Navigator")
FileCopy ("Bookmark.htm", "Bookmark.tmp", @FALSE)					;back up bookmarks
If FileExist ("C:\XXX\MyBkmark.htm") == @FALSE then goto NoBook				;check if personal bookmarks exist
FileCopy ("C:\XXX\MyBkmark.htm", "Bookmark.htm", @FALSE)				;replace with personal bookmarks
:NoBook
DirChange ("C:\")
RunWait ("C:\Windows\Desktop\Netscape Navigator Gold", "")				;run Netscape, wait for session end
DirChange ("C:\Program Files\Netscape\Navigator")
FileCopy ("Bookmark.htm", "C:\XXX\MyBkmark.htm", @FALSE)				;copy out to personal bookmarks
FileCopy ("Bookmark.tmp", "Bookmark.htm", @FALSE)					;restore original bookmarks
FileDelete ("Cookies.txt")								;delete cookies
FileDelete ("Netscape.hst")								;delete history
DirChange ("Cache")
FileDelete ("*.*")									;delete cache files
DirChange ("C:\Windows")
URLS = RegQueryItem(@REGCURRENT,"Software\Netscape\Netscape Navigator\URL History")	;check URL History
if URLS == "" then goto done								;if no URL History, done
len = ItemCount(URLS, @TAB)								;count URL History items
for I = 1 to len
DelURL = ItemExtract (I, URLS, @TAB)
RegDelValue (@REGCURRENT,"Software\Netscape\Netscape Navigator\URL History[%DelURL%]")	;delete URL History items
next
:done
DirChange ("C:\")
exit


Article ID:   W13808
Filename:   Use Private Netscape Bookmark and Cookies during Session.txt
File Created: 1999:04:15:16:56:30
Last Updated: 1999:04:15:16:56:30