DosTips.com

A Forum all about DOS Batch
It is currently 31 May 2016 08:06

All times are UTC-06:00




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 04 Mar 2012 09:55 
Offline

Joined: 26 Oct 2011 22:38
Posts: 1007
Location: Egypt
how to check for a certain registry value and firewall rule using batch file :?:


Last edited by abc0502 on 12 Mar 2012 00:30, edited 1 time in total.

Top
   
PostPosted: 04 Mar 2012 10:26 
Offline
Expert

Joined: 22 Jan 2010 18:01
Posts: 1988
Location: Germany
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:
netsh advfirewall firewall show rule name=all type=dynamic

Regards
aGerman


Top
   
PostPosted: 04 Mar 2012 10:34 
Offline

Joined: 26 Oct 2011 22:38
Posts: 1007
Location: Egypt
Thanks Worked fine :D
This is how for any one else want the code:
Code:
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:
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


Top
   
PostPosted: 04 Jun 2012 00:36 
Offline

Joined: 25 May 2012 01:03
Posts: 1
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?


Top
   
PostPosted: 18 Jun 2012 11:44 
Offline

Joined: 21 Nov 2010 08:07
Posts: 233
Location: At My Computer
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... :?:


Top
   
PostPosted: 19 Jun 2012 16:29 
Offline

Joined: 28 Jun 2010 03:46
Posts: 249
@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


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 6 posts ] 

All times are UTC-06:00


Who is online

Users browsing this forum: Google [Bot], sambul35, Yahoo [Bot] and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited