Thursday, January 3, 2019

How to list all files in cookies in vbscript?

Cookie is a file stored by the web server on web client machine.
If you want to find out the cookies in your machine you can use below program.

Const COOKIES = &H21&

Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(COOKIES)
Set objFolderItem = objFolder.Self

Msgbox "The path of cookies folder is ->  " &  objFolderItem.Path

Set colItems = objFolder.Items
For Each cookie in colItems
   Msgbox  cookie.Name
Next

Related Posts:

  • How to create a word document using vbscript How to create a word document using vbscript ' Create and Save a Word Document'Create the Word objectSet objWord = CreateObject("Word.Application")'Set the caption of the WordobjWord.Caption = "Welcome to Automated Wo… Read More
  • How to terminate the process in vbscript How to terminate the process in vbscript Here is the vbscript  that will terminate or close all the processes with given nameIn below script I am closing internet explorer process.'Create a WMI objectstrComputer … Read More
  • What is Windows Script Host? What is Windows Script Host? WSH is a scripting host for Windows Script compatible scripting engines.WSH supports various scripting languages like vbscript, javascript, python etc.You can do below operations using WSH… Read More
  • Error handling in VBScript Error handling in VBScript VBScript provides below statements and keywords to handle errors. on error resume next Err object - err.description, err.number Sample code to handle the error is given below If er… Read More
  • What is WMI? What is WMI?  WMI and Win32 classes WMI stands for Windows Management Instrumentation. This is used to access system hardware and software features. It provides very powerful API to perform tasks like starting pr… Read More

0 comments:

Post a Comment

Blog Archive

Translate

Popular Posts

Total Pageviews

150,591

Blog Archive