Jump to content
Sign in to follow this  

Weird Question

Recommended Posts


Ok, I'm totally stumped on this one and I need some help. I'm trying to make a script that will help me carry cookies from pc to pc as I travel but I am having troubles with firefox. The code I have below is crappy but it almost gets the job done.

$s_Firefox = 'HKLM\SOFTWARE\Mozilla\Mozilla Firefox' 
$s_FirefoxVersion = RegEnumKey($s_FireFox, 1)
If @error Then
    $fff = 1
    $fff = 2
        If $fff = 2 Then    
    $FileList=_FileListToArray(@AppDataDir & "\Mozilla\FireFox\Profiles")
    $cookies = @AppDataDir & "\Mozilla\FireFox\Profiles\" & $FileList[1] & "\cookies.txt"

When I tested this on a computer without firefox it still reads this line:

$cookies = @AppDataDir & "\Mozilla\FireFox\Profiles\" & $FileList[1] & "\cookies.txt"

Then it throws an error and me and the script stops. I guess where I am getting at, how exactly am I going to know if it has firefox or not when it goes to copy over the file to my flash drive. I can't have it copy over where $fff = 2, I need to wait until the end of the script but when I get to:

FileCopy($cookies, "E:\cookies\firefox\cookies.txt")

How am I going to know if $cookies actually exists or not?

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.