Page 1 of 1
check registry values and firewall rules [solved]
Posted: 04 Mar 2012 09:55
by abc0502
how to check for a certain registry value and firewall rule using batch file
Re: check registry values and firewall rules
Posted: 04 Mar 2012 10:26
by aGerman
Depends on what exactly you're looking for.
REG QUERY to read registry values.
NETSH ADVFIREWALL to define or get settings about the firewall.
try
Code: Select all
netsh advfirewall firewall show rule name=all type=dynamic
Regards
aGerman
Re: check registry values and firewall rules
Posted: 04 Mar 2012 10:34
by abc0502
Thanks Worked fine
This is how for any one else want the code:
Code: Select all
netsh advfirewall firewall show rule name="uTorrent" >nul
if %errorlevel%== 0 ECHO uTorrent Firewall Rule Exist
) Else ( ECHO uTorrent Firewall Rule Doesn't Exist )
The Registry
Code: Select all
set a=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
REG QUERY "%a%" /v "uTorrent" /s >nul
if %errorlevel%== 0 ( ECHO uTorrent Startup Entry Exist
) Else ( ECHO uTorrent Startup Entry Doesn't Exist )
replace the rule name in firewall and the startup entry name in registry with your program and the message after ECHO
Re: check registry values and firewall rules [solved]
Posted: 04 Jun 2012 00:36
by yaiohena
How to have utorrent finish a torrent download from Bittorrent? I'm switching over from using Bittorrent to utorrent, but I have a huge unfinished file to download that's halfway through. I don't wanna start it over, so I need to know how I can have utorrent finish it (w/o accidently reseting the download to 0%). So, what do I need to do to have utorrent finish my Bittorrent download?
Re: check registry values and firewall rules [solved]
Posted: 18 Jun 2012 11:44
by Dos_Probie
Good Stuff!!
But how can I add an exception in Windows Firewall for a program via your code and reg??
ex. say I want to add a startup entry for uTorrent...
Re: check registry values and firewall rules [solved]
Posted: 19 Jun 2012 16:29
by miskox
@yaiohena:
This is offtopic, but utorrent was mentioned above so:
I would do this:
1. Maybe you could make a backup of these partialy downloaded files?
2. open this .torrent file with uTorrent - make sure download location is the same. Also make sure it does *not* start.
3. right click on the torrent and select Recheck (or something like this).
4. It should start checking what you have - it should finish with the same downloaded value - if not then it would mean that your download location is not the same.
5. When it finishes just click Start or Force start.
This is confirmed to be working.
Saso