locked
Import Cookies By Script RRS feed

  • Question

  • Hello,

    Is it possible to import cookies by script, whether it be a .vbs or batch file?  I would like to have all of my users have a cookie that enables SafeSearch for Google without them having to enable it.

    Friday, November 6, 2015 9:23 PM

Answers

  • Hi,

    You can use Python script to realize it. We have found an issue which similar to yours and it has been solved. Please refer the link below to know how to perform.

    http://stackoverflow.com/questions/10858499/python-import-cookies

    Please Note: Since the website is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

    If it still doesn't help, you can post it to Script Forum for more help.

    https://social.technet.microsoft.com/Forums/scriptcenter/en-us/home?forum=ITCG

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. 

    Thank you for your understanding.

    Wish you have a nice day.

    Best Regards

    Simon


    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Tuesday, November 10, 2015 5:37 AM
  • Hello,

    I got it partially working by doing the following:

    1.  I deleted all of my cookies.

    2.  I went to Roaming\MS\Win\Cookies and deleted any remaining cookies.

    3.  Deleted everything in content.ie5 folder.

    4.  Configured IE from CP\Internet Options home page to about:blank.  This way, the home page does not bring down any cookies.

    5.  I went to these 3 sites only:

         www.google.com/preferences

         search.yahoo.com/preferences/preferences

         www.bing.com/account/general

    6.  I did a File\Export, export cookies.

    7.  On another computer, I ran a batch file that did the following:

         Deleted the cookies by running

    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2

         Then I import the cookies with NO QUOTES around the path, even with spaces!!

    rundll32 C:\Windows\system32\ieframe.dll,ImportCookieFileByProcess \\path to file\cookies.txt

    Now, the user has Google, Yahoo, and Bing set to SafeSearch.  I just need to figure out how to get this to work with Windows 10 and Windows 7 with UAC enabled.

    Monday, November 23, 2015 10:03 PM

All replies

  • Hi,

    You can use Python script to realize it. We have found an issue which similar to yours and it has been solved. Please refer the link below to know how to perform.

    http://stackoverflow.com/questions/10858499/python-import-cookies

    Please Note: Since the website is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

    If it still doesn't help, you can post it to Script Forum for more help.

    https://social.technet.microsoft.com/Forums/scriptcenter/en-us/home?forum=ITCG

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. 

    Thank you for your understanding.

    Wish you have a nice day.

    Best Regards

    Simon


    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Tuesday, November 10, 2015 5:37 AM
  • Hello,

    I got it partially working by doing the following:

    1.  I deleted all of my cookies.

    2.  I went to Roaming\MS\Win\Cookies and deleted any remaining cookies.

    3.  Deleted everything in content.ie5 folder.

    4.  Configured IE from CP\Internet Options home page to about:blank.  This way, the home page does not bring down any cookies.

    5.  I went to these 3 sites only:

         www.google.com/preferences

         search.yahoo.com/preferences/preferences

         www.bing.com/account/general

    6.  I did a File\Export, export cookies.

    7.  On another computer, I ran a batch file that did the following:

         Deleted the cookies by running

    RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2

         Then I import the cookies with NO QUOTES around the path, even with spaces!!

    rundll32 C:\Windows\system32\ieframe.dll,ImportCookieFileByProcess \\path to file\cookies.txt

    Now, the user has Google, Yahoo, and Bing set to SafeSearch.  I just need to figure out how to get this to work with Windows 10 and Windows 7 with UAC enabled.

    Monday, November 23, 2015 10:03 PM