.VBS VBScript to Launch URL & NOT add to history

I need to use VBScript (.vbs file) to open a URL, but not add the URL to the browser history. This is NOT for MS Access VBA -- but...
...In VBA in MS Access, if I were using it, I would use:
Application.FollowHyperlink "http://www.google.com", , , AddHistory:=False
...but again I need to use VBS.

I don't see a property in the MSDN documentation (if it's even the right documentation) at http://msdn.microsoft.com/en-us/library/aa752084(v=vs.85).aspx

So how does Application.FollowHyperlink do it, and how can I do something similar in VBA? (I just don't want this particular link to get added to the history, I don't want or need to delete all my history.)
Option Explicit 
Dim IE 
Set IE = wscript.createobject("internetexplorer.application","IE_") 
With IE
	.visible = False
	.AddHistory = False
	.navigate ("http://www.google.com/") 'May contain website login info, and thus I don't want this to be added to this history. How do I implement that?
	while (.busy)    'wait until the site gets loaded 
		wsh.sleep 400
	wend
	while (.ReadyState = 4) 'ReadyState_Complete
		wsh.sleep 400
	wend
	'IE.visible = True 'Commented to continue hiding
	.quit
End With 'IE
Set IE = Nothing

Open in new window

LVL 1
travisjbennettAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SiddharthRoutCommented:
aikimarkCommented:
@Sid

This is a VBScript environment.
travisjbennettAuthor Commented:
Sid, I'm about to get to work. I'm a little confused though by your last post: (what) is a VBScript environment?

The code of your first post?
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

travisjbennettAuthor Commented:
I tried the code below after clearing my history. Microsoft.com still got added to my history list.

At the bottom of your second link, in community content, it says that this flag won't keep a site from getting added to the main history list.
Option Explicit 
Const navNoHistory = &h0002
Dim IE 
Set IE = wscript.createobject("internetexplorer.application","IE_") 
With IE
	.visible = False
	.navigate "http://www.microsoft.com/", CLng(navNoHistory)
	while (.busy)    'wait until the site gets loaded 
		wsh.sleep 400
	wend
	while (.ReadyState = 4) 'ReadyState_Complete
		wsh.sleep 400
	wend
	'IE.visible = True 'Commented to continue hiding
	.quit
End With 'IE
Set IE = Nothing

Open in new window

SiddharthRoutCommented:
@aikimark: Yes I know it is vbscript :)

@travisjbennett: You have defined the constant incorrectly. I just tried this and it works.

Option Explicit
Const navNoHistory = &H2

Dim IE
Set IE = wscript.CreateObject("internetexplorer.application", "IE_")

With IE
    .Visible = True
    .navigate "http://www.rediff.com/", navNoHistory
    While (.busy)    'wait until the site gets loaded
        wsh.sleep 400
    Wend
End With

Open in new window


Sid
SiddharthRoutCommented:
travis: Seems I spoke to soon. I just tried it with a different URL and it got added. Lemme check.

Sid
SiddharthRoutCommented:
Yes you are right. I read the community comment in this link as well.

http://msdn.microsoft.com/en-us/library/aa768360%28VS.85%29.aspx

Seems like that flag doesn't work. Dunno why MS put it then.

Sid
travisjbennettAuthor Commented:
I think that flag has to do with the back & forward buttons...
if that page (or maybe the preceeding page that the browser was on before the command?) is accessible with back and forward.

Any other ideas, or maybe a seperate script or something that could do it? I do not want to use MS Access here.
aikimarkCommented:
If the browser is IE8, the documentation states that you can use the -private command line switch.

http://msdn.microsoft.com/en-us/library/ee330728(v=vs.85).aspx

=======
You might choose to clear the history at the end of your process.
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1

Open in new window


http://www.howtogeek.com/howto/windows/clear-ie7-browsing-history-from-the-command-line/

=======
You might consider using a different browser (not IE)
travisjbennettAuthor Commented:
I mentioned my browser, but only in the question tags. I am limited to IE7.
aikimarkCommented:
Can you tolerate any browser history entries?  If so, you might be able to display the content of the actual web site from a neutral web site (within a frame).

Is the site always going to be the same site?

======
What problems are you trying to circumvent by preventing a browser history entry?  Knowing the context of the problem might be helpful to the participating experts.
travisjbennettAuthor Commented:
I need to pass a plaintext password in the URL. The password is very sensitive.

I can't put it in a frame of a page hosted anywhere other than localhost. I cannot tolerate any browser history entries that would include the URL with the password in it, encrypted or not.
aikimarkCommented:
Since the password is sensitive, you shouldn't send it in an unencrypted form unless you are using SSL.  In your case, encrypt the password with a salt and then convert it into Base64 format.  Make sure the salt changes with each use.

WARNING:
Since this is a VBScript, please be aware that your script will likely include a plain text copy of the password.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
travisjbennettAuthor Commented:
Aikimark,

You're right -- I had forgotten about packet sniffing. The server doesn't currently offer SSL, but I'll be waiting for it to do so.

When it does, do the URLs of SSL pages get stored in the IE7 history?
aikimarkCommented:
@travisjbennett

I think we ought to start with the requirements and see if there are ways to achieve what you want.  For instance, there are applications, such as Putty, that provide secure TCP/IP communication.
travisjbennettAuthor Commented:
There's actually not a way to do this, and I can't really go into the details for security reasons. For example, I've already had to change my password after sending it out over the network as plaintext.

I can award you the points for the right answer though. Thanks for the slap on the back of the head (I deserved it)!
aikimarkCommented:
@travisjbennett

While I appreciate the points, I disagree with your conclusion that there's "not a way to do this".  Good luck with this problem.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.