tophitter / peerblock

Automatically exported from code.google.com/p/peerblock
Other
0 stars 0 forks source link

"Start with Windows" don't work in Windows 7 RTM #113

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Intall PeerBlock and enable ""Start with Windows".
2. Restart machine.
3. Peerblock don't start automatically.

What is the expected output? What do you see instead?

What version of PeerBlock are you using? On what operating system? 32- or
64-bit?
PeerBlock r162 - INTERIM RELEASE
Windows 7 RTM 32bits.

Please provide any additional information below.  Make sure to attach
peerblock.log and/or any screenshots that would help explain your problem.

Original issue reported on code.google.com by djmele...@gmail.com on 20 Sep 2009 at 6:34

GoogleCodeExporter commented 8 years ago
Sadly, this is correct.  Because we need to load a kernel-mode driver in order 
to
hook into the Windows network stack, we require Administrator privileges in 
order to
run.  Because we require Administrator privileges, Windows UAC refuses to let 
us run
at startup because it can't pop up a prompt to request this privilege.

The root cause of the problem is that we are running as an app, not a Windows
Service.  For a future PeerBlock 2.0 release we plan on re-architecting the 
program
to be able to run as a native Windows Service, which will let us run at 
startup, let
us provide better services on a multi-user computer, and do a few other nifty 
things.
 As this will require a rewrite of much of the current code-base, we felt we'd rather
first stabilize what's there now for a PeerBlock 1.0 release.

While I have not tested this myself, I believe that as a workaround you should 
in
theory be able to disable UAC and it should work.  Another possibility would be
finding a way to run PeerBlock as a service; I remember there's a page on the 
PG2
Wiki about doing this, but there were quite a few caveats there.

We are in the process of documenting this in the new "manual" we're looking to 
put
together (as well as in our FAQ page).  If we can find a way to detect whether 
UAC is
enabled or not I'll also consider popping up a warning box if you try to do 
this in a
circumstance in which it's not likely to work.

Note that this is technically a duplicate of ISsue 3 ("Admin Mode required"), 
but I
think we should leave it open nonetheless to make sure people can find it 
easier.

Thanks for the problem report, and I wish we had a better answer for you.

Original comment by peerbloc...@gmail.com on 21 Sep 2009 at 12:04

GoogleCodeExporter commented 8 years ago
Works fine with Windows 7 64bit RTM, when UAC is disabled FYI.

Original comment by saki...@gmail.com on 25 Sep 2009 at 12:15

GoogleCodeExporter commented 8 years ago
Thanks for the confirmation, sakison.

Forum member "Freelandr" has documented a tutorial on getting PeerBlock to 
start with
Windows if you have UAC enabled:
http://www.peerblock.com/userguide/how_to_use/htu-useraccountcontrol.  I'd like 
for
us to programmatically determine whether UAC is enabled during PeerBlock 
startup, and
setup the correct "Start with Windows" type either way.

Changing PeerBlock into a service will still be the far better way to resolve 
this
issue, but doing what I mentioned above should work as a stopgap measure while 
we
work on that (large!) project.

Targetting for 1.1

Original comment by peerbloc...@gmail.com on 29 Sep 2009 at 4:14

GoogleCodeExporter commented 8 years ago

Original comment by peerbloc...@gmail.com on 30 Sep 2009 at 4:20

GoogleCodeExporter commented 8 years ago

Original comment by peerbloc...@gmail.com on 1 Oct 2009 at 5:21

GoogleCodeExporter commented 8 years ago
Hi all, first off thanks for the killer app, I was a avid user of PG2, although 
I had
to use readydriver to address the signature issue (Vista x64)
I am now using Windows 7 Ultimate x64, I have PB set to start with windows- 
which it
does/ splash + update, but it does not always show in the tray, even though I 
have it
set to display icon in Windows and in PB. It looks like it is working in Task
Manager, but I have no icon to click to open the settings to see if it IS 
working or
to manually update.
At the moment I am stopping the process in TM and restarting it from the 
installation
folder, then I get the icon and can check if all is OK, but it is a pain in the 
ass
doing this every time.
Anyone have the same issue? this did happen with PG2 every now and then.
I have read the thread " tray icon dissapeering" but I think this is an 
unrelated issue.
Any help would be great. 

Original comment by AredEyed...@gmail.com on 10 Nov 2009 at 10:11

Attachments:

GoogleCodeExporter commented 8 years ago
XhmikosR is currently working on using the Installer to automate the "Scheduled 
Task"
workaround linked-to above.  Once that's working, we'll need to add code to 
PeerBlock
itself to do the same if the user clicks the "Start with Windows" option in the
Settings panel.

AredEyedSquid, have you tried using the workaround linked-to in my previous 
Sept 28th
comment?

Original comment by peerbloc...@gmail.com on 3 Dec 2009 at 2:24

GoogleCodeExporter commented 8 years ago
This tutoria of freelandr
http://www.peerblock.com/userguide/how_to_use/htu-useraccountcontrol is very 
good.
I followed it and Peerblock now starts automatically under windows 7.
But there is still one annoying point:

Windows 7 is asking for admin rights, in order that I can't let it start by 
going
away from my PC.

Is there any solutions for that. I tried to look under 
"System/Administration/Services".
But as far as I understand it, we need a service delivered by Peerblock, that we
could change it. Since, Windows 7 doesn't let me "install" a service manually.

Do I understand anything wrong or is there any hint to resolve the problem?

Original comment by hurenka...@gmail.com on 21 Feb 2010 at 6:47

GoogleCodeExporter commented 8 years ago
Issue 314 has been merged into this issue.

Original comment by peerbloc...@gmail.com on 16 May 2010 at 5:38

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Yes, there is a way to make Peerblock start automatically without asking for 
admin rights.

Follow the guide, but in the first step, under General tab, change the 
following:

1. When running the task, use the following user account:
*choose your admin account here*

2. select "Run wether user is logged on or not" (DON'T select "Do not store 
password")

Original comment by 8mee...@gmail.com on 20 Aug 2010 at 2:05

GoogleCodeExporter commented 8 years ago
I've been doing the steps as indicated here and it boots fine works fine EXCEPT 
the icon is not visible under the local user (which is the same user it's being 
started as), and the program must be terminated and relaunched in order to make 
changes.

In task manager I must go to "Show processes from all users" in order to find 
the peerblock process.

While that does provide a neat bit of security it's a pain in the ass.  If I 
launch PB from start menu while it's still running in process, it won't display 
the window at all, I have to end the task and reopen to make changes or to 
troubleshoot when an app doesn't work.

I follow the htu-useraccountcontrol tutorial seems to work if I take the steps 
by 8meeho8 to avoid asking for admin rights.  I store the password, and login 
with the same user account.

Am I doing something wrong?

Original comment by gedr...@gmail.com on 13 Dec 2010 at 2:14

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Make sure nothing else is starting up peerblock on your computer.  You can 
ensure this is the case by updating the trigger on the task that you had 
created to start after 30 minutes, then reboot.  

If you still notice peerblock.exe running, you probably have the application 
starting up someplace else on your computer, or through another task.

Original comment by edub...@gmail.com on 18 Dec 2010 at 6:12

GoogleCodeExporter commented 8 years ago
I've managed to somewhat resolve the problem and get the icon using a 
combination of delay on the trigger and some changes to the settings, as 
compared to 8meeho8.  The delay count is short enough that I am not left 
unprotected very long.

Here are all the settings I use in my Task Scheduler, in order:

*General*:
When running this task, use the following account: (My Computer/My Account)
Run Only When User is Logged On is selected.
Run with Highest Privileges is selected.
Configure for Windows 7.
*Triggers*:
Trigger "At Log On":
Begin the Task: At Log On
Specific User: My Account (it auto selected my user account when I selected 
Specific User).
Delay task for: 18 seconds (manually entered value)
Everything else unselected.
Enabled is selected.
*Actions*:
Start a Program:
Action: Start a Program
Program Script:
"C:\Program Files\PeerBlock\peerblock.exe"
Start In (Optional): C:\Program Files\PeerBlock\
(no quotes)
*Conditions*:
Everything unselected.
*Settings*:
Have selected the following ONLY:
Allow task to be run on demand.
Run task as soon as possible after a scheduled start is missed.
If task fails, restart every: 1 Minute.

All the rest was unselected.
If the task is already running, then the following rule applies:
Do not start a new instance.

History is marked as Disabled.

I hope these steps help to correct the multiple users which had "me-too" 
syndrome on this issue.

Original comment by gedr...@gmail.com on 18 Dec 2010 at 6:58

GoogleCodeExporter commented 8 years ago
I am still unable to get it to start at startup, using the settings mentioned 
above, as well as the original peerblock settings for UAC. any help will be 
appreciated.

Original comment by Udit....@gmail.com on 13 Apr 2011 at 5:52

GoogleCodeExporter commented 8 years ago
"I am still unable to get it to start at startup, using the settings mentioned 
above, as well as the original peerblock settings for UAC. any help will be 
appreciated."

Is there no indication at startup at any time of the Update Window loading at 
all?  You may want to try playing with the delay timer - my machine is pretty 
fast so the 18 seconds is all that's required, with pretty much very little 
else running at startup (I've got my Antivirus, a few device tray icons, and a 
virtual CD), to make sure the system tray is all loaded before PB starts.  
Regardless of your UAC settings (Mine are set on highest to test this) these 
steps should work fine for Windows 7.  What do you have that's different in 
your settings, if anything, at all different?  Make sure you include the Start 
In - I put (Optional) because that's the name of the field, but in these 
settings it is not optional.

Original comment by gedr...@gmail.com on 13 Apr 2011 at 3:11

GoogleCodeExporter commented 8 years ago
Thanks for your reply, I kind of gave up on Peerblock running at startup. 
Nevertheless, I think I should once again try it out: I'll create a task that 
runs probably at 3-4 minutes after bootup, because my computer takes that long 
(its not the fastest, I must say).

The task is seen in the task manager, but nothing on the desktop or the tray. 
And no, there is absolutely no indication of starting up other than in task 
manager whatsoever.

Original comment by Udit....@gmail.com on 28 Apr 2011 at 1:11

GoogleCodeExporter commented 8 years ago
"The task is seen in the task manager, but nothing on the desktop or the tray. 
And no, there is absolutely no indication of starting up other than in task 
manager whatsoever."

If you run PeerBlock from the start menu after confirming it is in Task 
Manager, can you get the interface?  If you can, make the delay on startup 
longer.

If you CANNOT get the interface in this fashion, you don't have it starting As 
you, only when you log in, etc.  Follow the steps in my post precisely (the 
delay is up to you really, but the rest of the stuff is important.  Especially 
making sure it enters as your account.  It may ask you for your password - if 
your password is BLANK it will not work properly.

Original comment by gedr...@gmail.com on 28 Apr 2011 at 2:08

GoogleCodeExporter commented 8 years ago
Thank you so much Sir!!

I got it working and 150 seconds was the perfect number :) It works at 150, not 
at 149 and well, works after any number post 150...so everything is good, I can 
stop being paranoid...once again I appreciate all the help. UAC is a disgrace, 
and I hope Windows 8 comes up with something to combat this nuisance. In the 
meantime, let me setup ipblock on my Ubuntu with the iblocklists :)

Original comment by Udit....@gmail.com on 28 Apr 2011 at 4:39

GoogleCodeExporter commented 8 years ago

Original comment by XhmikosR on 28 Apr 2011 at 1:14

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
RE: Comment #24:
UAC can be turned off, you know.  And to be honest, ipblock with Ubuntu would 
work okay I guess, it sounds like you could configure it to allow HTTP or 
disallow with a script, but that's up to you.

Also, to whomever entered the comment (which appears to have been deleted) 
about how they removed the scheduler, disable Windows UAC, and it will work 
fine.

UAC is really the cause of this, and really truly the problem is that PeerBlock 
was not written as a service.  If I had the script, more free time, and a clear 
understanding of it, I could probably say building the system into a service 
would be doable, but for now, I would say, we have a workaround.  It sucks, but 
it is a workaround.

Original comment by gedr...@gmail.com on 30 Sep 2011 at 12:36