Build Your Own Arcade Controls Forum

Main => Everything Else => Topic started by: protokatie on November 27, 2009, 10:25:14 pm

Title: How do I make a batch file "invisible"? (Fixed)
Post by: protokatie on November 27, 2009, 10:25:14 pm
Basically, is there a way to run a batch file that runs continuously in the background start without having the console window open? My roomate's teenage kids keep killing my UPS control batch file and no matter how many times I tell them not to, they do. Its either make it invisible, or have two batch files running that detect if the other goes diwn and reruns it, or kick the kids off of the fileserver/entertainment center PC...
Also, it has to be able to run at boot and be ready to run tasks, so it can't be relegated to another user desktop.
Any ideas?


Edit: I found a method that might work, but havent tested it yet:

Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "C:\Batch Files\syncfiles.bat" & Chr(34), 0
Set WshShell = Nothing

Put into a text.VBS type file.

Anyone ever use this? Is the process name still visible in taskmanager?



Edit2: OK, nevermind, the script above works just fine. Maybe someone else will find it useful.
Title: Re: How do I make a batch file "invisible"? (Fixed)
Post by: Ummon on December 01, 2009, 02:57:09 am
What would you have a batch file for UPS for?
Title: Re: How do I make a batch file "invisible"? (Fixed)
Post by: protokatie on December 01, 2009, 03:52:18 am
What would you have a batch file for UPS for?

I have a UPS that has no communication to the computer, so I set up the batch file to check every 4 seconds for the existence of a file on another computer not UPS protected. So if that other computer (my magic jack compy) went down (power outage) the fileserver would detect this and start a shutdown sequence (using startrek sounds) and after 5 minutes of the file still not being in existence it finally shuts down. The 5 minutes helps prevent the fileserver from shutting down from things like resetting the router, etc.

Does that answer your question?

Also, I added a tonne of stuff to the batch file to control all sorts of stuff remotely. I hope I don't end up with M$ level feature creep...
Title: Re: How do I make a batch file "invisible"? (Fixed)
Post by: DaOld Man on December 01, 2009, 07:59:26 pm
Sorry Katie, Im a little late, but I was going to suggest you use the Invisible Batch File Paint.
Title: Re: How do I make a batch file "invisible"? (Fixed)
Post by: protokatie on December 02, 2009, 01:40:30 am
The last time I bought invisible paint, it was also marketed as "light as air" and "oderless". Either I spilled it all when opening it, or it didn't do a good job. Either way I could not tell.


@ Ummon, I did finally get your post, it was just a bit too convoluted from the "What would you have UPS do for you" slogon that I didn't catch it right away.
Title: Re: How do I make a batch file "invisible"? (Fixed)
Post by: Ummon on December 03, 2009, 02:17:29 am
The last time I bought invisible paint, it was also marketed as "light as air" and "oderless". Either I spilled it all when opening it, or it didn't do a good job. Either way I could not tell.


@ Ummon, I did finally get your post, it was just a bit too convoluted from the "What would you have UPS do for you" slogon that I didn't catch it right away.

.....um.....Right. Yeah. I'm so clever.

No, I was...really asking what you answered. Ah sea, yeas.

I don't have mine hooked up because I don't want them to shut down automatically....although, I do sometimes leave it on all day and go places. I hadn't really thought about that. But I leave it with stuff up. Hmmm.
Title: Re: How do I make a batch file "invisible"? (Fixed)
Post by: protokatie on December 03, 2009, 02:41:34 am
The last time I bought invisible paint, it was also marketed as "light as air" and "oderless". Either I spilled it all when opening it, or it didn't do a good job. Either way I could not tell.


@ Ummon, I did finally get your post, it was just a bit too convoluted from the "What would you have UPS do for you" slogon that I didn't catch it right away.

.....um.....Right. Yeah. I'm so clever.

No, I was...really asking what you answered. Ah sea, yeas.

I don't have mine hooked up because I don't want them to shut down automatically....although, I do sometimes leave it on all day and go places. I hadn't really thought about that. But I leave it with stuff up. Hmmm.

Out of curiosity, does the UPS software that comes with your UPS allow for hibernate mode? That seems like it would be the best compromise as it would protect data integrity on the disks as well as preserve whatever you were working on. The shutdown.exe command I use in my batch file supports hibernate, too bad the fileserver it is protecting doesn't.
Title: Re: How do I make a batch file "invisible"? (Fixed)
Post by: Ummon on December 05, 2009, 01:56:25 pm
I don't even run it. I use mine for the battery and surge protection.