Sorry if this is in the wrong section, couldn't find a section for working on batch files.
Anyway, here's my problem. I've made a firefox theme, and am distributing it. In order for the theme to work properly, the user needs to copy two files into a directory called "chrome". For some reason, a lot of people have problems finding the chrome directory, so I want to create a .bat file that automatically opens it for them.
Here is the exact location of the 'chrome' folder on my computer:
Please take special note of the random characters that are in bold in the directory above. That is the user's default profile directory, which is automatically created by Firefox during installation. As you can see, inside that directory is the chrome directory which I am trying to find and open.
However, that is where my problem lies. When Firefox creates the default profile directory which is in bold above, it assigns random numbers and letters before the .default extension. Which means that on different computers, the directory will have a different name (ie- 12345.default on one computer and abcde.default on another computer).
Using %RANDOM% does not work of course, but I have no idea what to do, because I know very little about .bat
Can someone please help me out and show me how to code this so that I can find and open the chrome directory?
Here is my current code:
@echo off color 0a echo Thanks for downloading the Baltimore Ravens Firefox theme! pause cls echo This program will find and open the 'chrome' directory of your Firefox browser. Once the directory opens, please copy the userChrome.css and userContent.css files into the 'chrome' directory, and restart Firefox pause cls echo Please report any bugs to me at: firstname.lastname@example.org pause cls [B]explorer C:\Users\%USERNAME%\AppData\Roaming\Mozilla\Firefox\Profiles\2xvz43gb.default\chrome[/B]
The line in bold is what I need to fix.
Thanks in advance for your help!