Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: How do I get foobar to startup on loadup (Read 6616 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How do I get foobar to startup on loadup

Is there away to get foobar to startup on loadup minimized in the sytem tray?

How do I get foobar to startup on loadup

Reply #1
If you run the following command, it should do what you want:
Code: [Select]
foobar2000.exe /command:"Foobar2000/Hide main window"

How do I get foobar to startup on loadup

Reply #2
So were do I go and put that do I have to do this in the registery? or what do I have to do?

How do I get foobar to startup on loadup

Reply #3
Create a new shortcut in your Autostart folder, and enter the above as the location (the first thing the upcoming wizard wants to know). You will have to replace foobar2000.exe with the full path, example: C:\Program Files\foobar2000\foobar2000.exe.

How do I get foobar to startup on loadup

Reply #4
Ok I add that line to the target line of every icon I have of foobar


"G:\Program Files\foobar2000\foobar2000.exe" /command:"Foobar2000/Hide main window"


then I went to regedit went to run and put in foobar with this in the value string:


"G:\Program Files\foobar2000\foobar2000.exe" /command:"Foobar2000/Hide main window"


So I restarted and it loaded up but it loaded the main menu.


So what am I doing wrong?

How do I get foobar to startup on loadup

Reply #5
I really need Help with this badly.

How do I get foobar to startup on loadup

Reply #6
Why don't you just copy the original foobar2000 shortcut into your startup folder, then right click on it and go to properties, and then where it says Run drop down the menu and choose minimized.

How do I get foobar to startup on loadup

Reply #7
Quote
Why don't you just copy the original foobar2000 shortcut into your startup folder, then right click on it and go to properties, and then where it says Run drop down the menu and choose minimized.
[a href="index.php?act=findpost&pid=253863"][{POST_SNAPBACK}][/a]



Tried that. It did not work

How do I get foobar to startup on loadup

Reply #8
What am I doing wrong someone must know!

How do I get foobar to startup on loadup

Reply #9
While I understand that you are badly hunting a solution, making somewhat redundant posts like "I really need help with this badly." and "What am I doing wrong someone must know!" might get a little frustrating. That aside:

You obviously need to have minimise to system tray enabled in preferences, but i assume you have done this already. It would seem that starting Foobar2000 minimised does not work, nor does starting Foobar2000 with /command:Foobar2000/Hide. It would seem you must instead do both. Unfortunately, as far as I can tell, you cannot simply do this in a batch file because the interpreter waits for GUI applications to terminate before continuing in scripts; even using the 'start' command does not help, unless you want a new window hanging around. One solution is to use a wsh (Windows scripting host) script. Wsh should hopefully already be installed on your system; it appears to come preinstalled with XP, though I am not sure about earlier versions of Windows. You can either place this script directly into your Startup folder or make a shortcut to it. An example VBScript follows (save it as text with a .vbs extension):
Code: [Select]
dim progpath
progpath = chr(34) + "c:\program files\foobar2000\foobar2000.exe" + chr(34)

dim shell
set shell = CreateObject("WScript.Shell")

shell.Run(progpath)
rem WScript.Sleep(500)
shell.Run(progpath + " /command:Foobar2000/Hide")

Obviously, you need to change progpath for your system (do not remove the chr(34) bits). If this does not work as is, you might need to remove the rem in front of the WScript.sleep(500); I have commented this out because it is not required on my system, but if Foobar2000 takes a while ot start on your system, it may be required. That line causes the script to wait for half a second before continuing to the next line.

Hope this helps.

Jamie

How do I get foobar to startup on loadup

Reply #10
Quote
While I understand that you are badly hunting a solution, making somewhat redundant posts like "I really need help with this badly." and "What am I doing wrong someone must know!" might get a little frustrating. That aside:

You obviously need to have minimise to system tray enabled in preferences, but i assume you have done this already. It would seem that starting Foobar2000 minimised does not work, nor does starting Foobar2000 with /command:Foobar2000/Hide. It would seem you must instead do both. Unfortunately, as far as I can tell, you cannot simply do this in a batch file because the interpreter waits for GUI applications to terminate before continuing in scripts; even using the 'start' command does not help, unless you want a new window hanging around. One solution is to use a wsh (Windows scripting host) script. Wsh should hopefully already be installed on your system; it appears to come preinstalled with XP, though I am not sure about earlier versions of Windows. You can either place this script directly into your Startup folder or make a shortcut to it. An example VBScript follows (save it as text with a .vbs extension):
Code: [Select]
dim progpath
progpath = chr(34) + "c:\program files\foobar2000\foobar2000.exe" + chr(34)

dim shell
set shell = CreateObject("WScript.Shell")

shell.Run(progpath)
rem WScript.Sleep(500)
shell.Run(progpath + " /command:Foobar2000/Hide")

Obviously, you need to change progpath for your system (do not remove the chr(34) bits). If this does not work as is, you might need to remove the rem in front of the WScript.sleep(500); I have commented this out because it is not required on my system, but if Foobar2000 takes a while ot start on your system, it may be required. That line causes the script to wait for half a second before continuing to the next line.

Hope this helps.

Jamie
[a href="index.php?act=findpost&pid=253898"][{POST_SNAPBACK}][/a]


Ok so I copyed your code in notepad changed the directory to G instead of C went to save it but I can't find a .vbs extension. So I am stuck there maybe you can just make this file for me and post it up on yousendit then I can download it and just place it in my startup menu.

"G:\Program Files\foobar2000\foobar2000.exe"

This is were it installed.

How do I get foobar to startup on loadup

Reply #11
... Select "All Files" in the 'Save As Type:' drop down and then type filename.vbs in the file name field, replacing 'filename' with whatever you choose. The only reason you have to select "All Files" first is that notepad has an annoying habbit of appending a .txt extension where you don't want it.

Jamie

How do I get foobar to startup on loadup

Reply #12
Quote
... Select "All Files" in the 'Save As Type:' drop down and then type filename.vbs in the file name field, replacing 'filename' with whatever you choose. The only reason you have to select "All Files" first is that notepad has an annoying habbit of appending a .txt extension where you don't want it.

Jamie
[a href="index.php?act=findpost&pid=253943"][{POST_SNAPBACK}][/a]



Ok Like I said I am not seeing this.

Ya I know already to change it to all files.

This is what I see in my notepad file in sava as mode.

file name: foobar.vbs(this is what I enter in)
Save type as: choice: txt doc or all files
Encoding: Choice of Ansi, Unicode, Unicode big endian and UTF-8

Thats all I see.

How do I get foobar to startup on loadup

Reply #13
Quote
This is what I see in my notepad file in sava as mode.

file name: foobar.vbs(this is what I enter in)
Save type as: choice: txt doc or all files
Encoding: Choice of Ansi, Unicode, Unicode big endian and UTF-8

Thats all I see.
[a href="index.php?act=findpost&pid=253946"][{POST_SNAPBACK}][/a]
Isn't the bit I've emboldened the bit you say you can't find?

I'm using Win2K and I don't even need to change the "Save as type" dropdown.  Just type foobar.vbs in the "File name" text box and hit save (irrespective of the "Save as type" value).  If you specify a file extension it will overwrite ".txt".
I'm on a horse.

How do I get foobar to startup on loadup

Reply #14
@chobo2: I don't understand your problem. What don't you see? It sounds like you've already got it all set, so just save the file as foobar.vbs or the like and then run it. It's nothing special or complicated; just a text file with a .vbs extension.

@Synthetic Soul: I think if hide extensions is enabled, notepad might append a .txt extension if 'All Files' is not selected first, but this has no real effect when saving a file if an extension is entered and hide extensions is disabled. However, I could be wrong about this and just mentioned it s a precautionary measure, since i seem to remember some people having problems with notepad appending an extra .txt after an entered extension (ending up with something like foobar.vbs.txt).

Jamie

How do I get foobar to startup on loadup

Reply #15
You could also try "foobar.vbs" instead of a plain foobar.vbs . This way a .txt extension should be avoided.

How do I get foobar to startup on loadup

Reply #16
Quote
@Synthetic Soul: I think if hide extensions is enabled, notepad might append a .txt extension if 'All Files' is not selected first, but this has no real effect when saving a file if an extension is entered and hide extensions is disabled. However, I could be wrong about this and just mentioned it s a precautionary measure, since i seem to remember some people having problems with notepad appending an extra .txt after an entered extension (ending up with something like foobar.vbs.txt).

Jamie
[a href="index.php?act=findpost&pid=253981"][{POST_SNAPBACK}][/a]
I agree with what you say - it's always best to cover all the bases.

However, to confirm, I have just tested and it still works, even with file extensions hidden.

I have also seen doubled file extensions happen, but I can't remember when or where this annoying fetaure occurs.
I'm on a horse.

How do I get foobar to startup on loadup

Reply #17
Don't these two posts by foosion already tell you everything you need to know how to get foobar opened on Windows startup?


Quote
If you run the following command, it should do what you want:
Code: [Select]
foobar2000.exe /command:"Foobar2000/Hide main window"

[a href="index.php?act=findpost&pid=253848"][{POST_SNAPBACK}][/a]

Quote
Create a new shortcut in your Autostart folder, and enter the above as the location (the first thing the upcoming wizard wants to know). You will have to replace foobar2000.exe with the full path, example: C:\Program Files\foobar2000\foobar2000.exe.
[a href="index.php?act=findpost&pid=253852"][{POST_SNAPBACK}][/a]

How do I get foobar to startup on loadup

Reply #18
@anza: No, they don't. First of all, the command is actually Foobar2000/Hide. Also, as I noted before, running this command to start Foobar2000 hidden does not appear to work, nor does starting Foobar2000 minimised; you have to first start Foobar2000 and then minimise/hide it (whether it be manually or with the Foobar2000/Hide command).

Jamie

How do I get foobar to startup on loadup

Reply #19
Well then just point the startup shortcut to a batch file that first opens foobar and then runs it minimized.

How do I get foobar to startup on loadup

Reply #20
@anza: That won't work either; see my post above about the reason for creating the VBScript. I have covered all of this stuff in previous posts.

Jamie

How do I get foobar to startup on loadup

Reply #21
Quote
@anza: That won't work either; see my post above about the reason for creating the VBScript. I have covered all of this stuff in previous posts.

Jamie
[{POST_SNAPBACK}][/a]


What are you talking about? It works perfectly here.

Code: [Select]
start D:\Applications\foobar2000\foobar2000.exe
start /wait D:\Applications\foobar2000\foobar2000.exe /command:Foobar2000/Hide


Save as foobar.cmd and enjoy.

If you want, you can also download CMDOW from [a href="http://www.commandline.co.uk/cmdow/index.html]here[/url], put it somewhere on your %path% and add "cmdow @ /HID" to the top of the batch to have the command window disappear almost as soon as it appears.

How do I get foobar to startup on loadup

Reply #22
Ok, I just re-tested this and I humbly admit that I stand very much corrected. :-) I could have sworn that the cmd window remained when start was called from a batch script and the 'start' documentation also seems to confirm this:
Quote
When executing an application that is a 32-bit GUI application, CMD.EXE
    does not wait for the application to terminate before returning to
    the command prompt.  This new behavior does NOT occur if executing
    within a command script.

However, it would appear that this is incorrect and the cmd window does in fact disappear (as long as /wait is not used) even in a batch script. I suspect what I did is forgot that the first quoted parameter is treated as the title of the window, and because my Foobar2000 is in "c:\program files", I have to quote the command. 'start' was then treating this as the window title and simply starting a command prompt (I mustn't have looked at the text of the window and seen it was an active command prompt) with that title, thus leading me to think that the window was not being closed. The only way to avoid this behaviour if you need to quote the command is to specify a title, as far as I can tell. The other reason I recommended using a VBScript is that you can specify a delay between the execution of the two commands (/wait will not serve this purpose), but it would seem that this is unnecessary. Indeed, there is no need to have the /wait on the Foobar2000/Hide command, since this will only cause the command window to wait about unnecessarily.

Actually, I just did some further testing, and for some reason, when I use "@echo off" at the top of my script, it seems that the command window *sometimes* refuses to close. It works flawlessly every time though when I remove "@echo off". Can anyone explain this? That is insane.

So, to recap on this confusion, create the following file and save it with a .cmd extension:
Code: [Select]
start "Foobar2000 launcher" "c:\program files\foobar2000\foobar2000.exe"
"c:\program files\foobar2000\foobar2000.exe" /command:Foobar2000/Hide


My apologies for the screw up and resultant confusion.

Jamie

How do I get foobar to startup on loadup

Reply #23
Quote
Ok, I just re-tested this and I humbly admit that I stand very much corrected. :-) I could have sworn that the cmd window remained when start was called from a batch script and the 'start' documentation also seems to confirm this:
Quote
When executing an application that is a 32-bit GUI application, CMD.EXE
    does not wait for the application to terminate before returning to
    the command prompt.  This new behavior does NOT occur if executing
    within a command script.

However, it would appear that this is incorrect and the cmd window does in fact disappear (as long as /wait is not used) even in a batch script. I suspect what I did is forgot that the first quoted parameter is treated as the title of the window, and because my Foobar2000 is in "c:\program files", I have to quote the command. 'start' was then treating this as the window title and simply starting a command prompt (I mustn't have looked at the text of the window and seen it was an active command prompt) with that title, thus leading me to think that the window was not being closed. The only way to avoid this behaviour if you need to quote the command is to specify a title, as far as I can tell. The other reason I recommended using a VBScript is that you can specify a delay between the execution of the two commands (/wait will not serve this purpose), but it would seem that this is unnecessary. Indeed, there is no need to have the /wait on the Foobar2000/Hide command, since this will only cause the command window to wait about unnecessarily.

Actually, I just did some further testing, and for some reason, when I use "@echo off" at the top of my script, it seems that the command window *sometimes* refuses to close. It works flawlessly every time though when I remove "@echo off". Can anyone explain this? That is insane.

So, to recap on this confusion, create the following file and save it with a .cmd extension:
Code: [Select]
start "Foobar2000 launcher" "c:\program files\foobar2000\foobar2000.exe"
"c:\program files\foobar2000\foobar2000.exe" /command:Foobar2000/Hide


My apologies for the screw up and resultant confusion.

Jamie
[a href="index.php?act=findpost&pid=254162"][{POST_SNAPBACK}][/a]



That works but the strange thing is that all of a sudden my other 2 ways I first tryed kicked in today. It is so weird.

How do I get foobar to startup on loadup

Reply #24
Quote
Ok, I just re-tested this and I humbly admit that I stand very much corrected. :-) I could have sworn that the cmd window remained when start was called from a batch script and the 'start' documentation also seems to confirm this:
Quote
When executing an application that is a 32-bit GUI application, CMD.EXE
    does not wait for the application to terminate before returning to
    the command prompt.  This new behavior does NOT occur if executing
    within a command script.

However, it would appear that this is incorrect and the cmd window does in fact disappear (as long as /wait is not used) even in a batch script. I suspect what I did is forgot that the first quoted parameter is treated as the title of the window, and because my Foobar2000 is in "c:\program files", I have to quote the command. 'start' was then treating this as the window title and simply starting a command prompt (I mustn't have looked at the text of the window and seen it was an active command prompt) with that title, thus leading me to think that the window was not being closed. The only way to avoid this behaviour if you need to quote the command is to specify a title, as far as I can tell. The other reason I recommended using a VBScript is that you can specify a delay between the execution of the two commands (/wait will not serve this purpose), but it would seem that this is unnecessary. Indeed, there is no need to have the /wait on the Foobar2000/Hide command, since this will only cause the command window to wait about unnecessarily.

Actually, I just did some further testing, and for some reason, when I use "@echo off" at the top of my script, it seems that the command window *sometimes* refuses to close. It works flawlessly every time though when I remove "@echo off". Can anyone explain this? That is insane.

So, to recap on this confusion, create the following file and save it with a .cmd extension:
Code: [Select]
start "Foobar2000 launcher" "c:\program files\foobar2000\foobar2000.exe"
"c:\program files\foobar2000\foobar2000.exe" /command:Foobar2000/Hide


My apologies for the screw up and resultant confusion.

Jamie
[a href="index.php?act=findpost&pid=254162"][{POST_SNAPBACK}][/a]


The second /wait was left there as I only quickly wrote the batch file and at first both of the starts had it, but it didn't work, so I removed the first one and it worked so I didn't bother to check if it worked without the second /wait.