How do I remove an old version of WinPcap?

242

Solution 1

While I never found a way to remove the old WinpCap my colleague suggested I boot up in safe mode in order to stop the mystery program from using it. Although I still got a warning that an old version was unable to be removed (and do I want to continue with the install?) the installation this time was successful.

So if you find yourself in this dilemma a possible workaround is to boot up in safe mode and install from there.

Solution 2

I resolved this issue on Windows 7 x64 by:

  1. opening a command prompt as administrator (Win+R > cmd > Enter)
  2. navigate to \windows\syswow64
  3. delete Packet.dll
  4. reboot
  5. Install new version of Winpcap

Solution 3

When I uninstalled some Netgear Wireless Adapter software, packet.dll was removed, enabling me to successfully install WinPcap.

Share:
242

Related videos on Youtube

tony starks
Author by

tony starks

Updated on September 18, 2022

Comments

  • tony starks
    tony starks almost 2 years

    I can't display my reply under each comment. Here is my code...

    Comment model

    <?php
    
    namespace App;
    
    use Illuminate\Database\Eloquent\Model;
    
    class Comment extends Model
    {
        public function commentable()
        {
            return $this->morphTo();
        }
    
        public function user()
        {
            return $this->belongsTo('App\User');
        }
    
        public function comments()
        {
            return $this->morphMany('App\Comment', 'commentable');
        }
    }
    

    Post model

    <?php
    
    namespace App;
    
    use Illuminate\Database\Eloquent\Model;
    
    class Post extends Model
    {
        protected $fillable = [
            'user_id', 'topic', 'body', 'category',
        ];
    
        public function user()
        {
            return $this->belongsTo('App\User');
        }
    
        public function comments()
        {
            return $this->morphMany('App\Comment', 'commentable');
        }
    }
    

    Comment controller

    <?php
    
    namespace App\Http\Controllers;
    
    use App\Comment;
    use App\Post;
    use Illuminate\Http\Request;
    use Illuminate\Support\Facades\Auth;
    
    class CommentController extends Controller
    {
        public function store(Request $request, $post)
        {
            $comment = new Comment;
            $comment->body = $request->body;
            $comment->user_id = Auth::user()->id;
            $post = Post::find($post);
            $post->comments()->save($comment);
    
            return back();
        }
    
        public function replyStore(Request $request, $comment)
        {
            $comment = new Comment;
            $comment->body = $request->body;
            $comment->user_id = Auth::user()->id;
            $comment = Comment::find($comment);
            $comment->comments()->save($comment);
    
            return back();
        }
    }
    

    Routes

    Route::post('/comment/store/{post}', 'CommentController@store')->name('comment.add');
    Route::post('/reply/store/{commentid}', 'CommentController@replyStore')->name('reply.add');
    

    View

    @extends('layouts.app')
    
    @section('content')
        <div class="container">
            <div class="row justify-content-center">
                <div class="col-md-12">
                    @if ($errors->any())
                        <div class="alert alert-danger">
                            <ul>
                                @foreach ($errors->all() as $error)
                                    <li>{{ $error }}</li>
                                @endforeach
                            </ul>
                        </div>
                    @endif
                    <div class="card">
                        <div class="card-header">{{$post->topic}}
                            <a href="/createPost" class="btn btn-secondary float-right">Create New Post</a>
                        </div>
                        <div class="card-body">
                            @if (session('status'))
                                <div class="alert alert-success" role="alert">
                                    {{ session('status') }}
                                </div>
                            @endif
                            <h3>{{$post->topic}}</h3>
                            <p>{{$post->body}}</p>
                        </div>
                    </div>
                    <form action="/comment/store/{{$post->id}}" method="post" class="mt-3">
                        @csrf
                        <div class="form-group">
                            <label for="">Comment :</label>
                            <textarea class="form-control" name="body" id="" rows="3"></textarea>
                            <br>
                            <input type="submit" value="Comment" class="btn btn-secondary">
                        </div>
                    </form>
    
                    <div class="row mt-5">
                        <div class="col-md-10 mx-auto">
                            <h6 style="border-bottom:1px solid #ccc;">Recent Comments</h6>
                            @foreach($post->comments as $comment)
                                <div class="col-md-12 bg-white shadow mt-3" style="padding:10px; border-radius:5px;">
                                    <h4>{{$comment->user->name}}</h4>
                                    <p>{{$comment->body}}</p>
                                    <button type="submit" class="btn btn-link" onclick="toggleReply({{$comment->id}})">
                                        Reply
                                    </button>
    
                                    <div class="row">
                                        <div class="col-md-11 ml-auto">
                                            {{-- @forelse ($replies as $repl)
                                            <p>{{$repl->body}}</p>
                                            @empty
    
                                            @endforelse --}}
                                        </div>
                                    </div>
                                </div>
    
                                <form action="/reply/store/{{$comment->id}}" method="post"
                                      class="mt-3 reply-form-{{$comment->id}} reply d-none">
                                    @csrf
                                    <div class="form-group">
                                        <textarea class="form-control" name="body" id="" rows="3"></textarea>
                                        <br>
                                        <input type="submit" value="Reply" class="btn btn-secondary">
                                    </div>
                                </form>
                            @endforeach
                        </div>
                    </div>
                </div>
            </div>
        </div>
    @endsection
    @section('js')
        <script>
            function toggleReply(commentId) {
                $('.reply-form-' + commentId).toggleClass('d-none');
            }
        </script>
    @endsection
    

    I have created the normal table with parent_id but I don't know how to display the replies for each comment. Please, anyone who can help me with this - I am stranded here and the error coming from the second controller function which is replystore() saying it doesn't recognize the comments() method. Please help me out to display the reply.

    • Karan
      Karan over 11 years
      Why do you have a "Windows 8 include directory" in Win7?
    • Ramhound
      Ramhound over 11 years
      Are you using Windows 7 or Windows 8? This is important information. Please remove any reference to the version of Windows your not using.
    • CramerTV
      CramerTV over 11 years
      Karan, The Windows 8 include directory I mentioned is likely there due to using Visual Studio 2012 which has Windows 8 functionality. Ramhound, as noted in the first sentence - I am using Windows 7. As to why I mentioned it, I was trying to ensure everyone had as much information as possible. I was not trying to confuse anyone but I clearly did. Apologies. Do you have any suggestions I might try?
  • CramerTV
    CramerTV over 11 years
    Thanks mdpc - rebooting is always good advice when finding strange problems but this time it has not helped. This is actually a very long standing problem for me. I first attempted using WinPcap (via Wireshark) 3 months ago and have simply been doing without it. I tried again yesterday with the same results but now I cannot just 'do without' anymore.
  • CramerTV
    CramerTV over 10 years
    I found that solution on the web, though it said to delete the files but alas, it didn't work for me.
  • CramerTV
    CramerTV over 10 years
    I did not receive an error when I deleted packet.dll. As I noted in the original post "According to the WinPcap FAQ I need to delete packet.* and wpcap.dll as well as npf.sys. Done." (and it didn't work)
  • CramerTV
    CramerTV over 10 years
    As I noted in the question I deleted packet.* which included packet.dll. It didn't work for me. My situation may have been unique.
  • agent86
    agent86 about 9 years
    This fixed my issue as well - I had some crummy Netgear USB software still installed, and it blocked WinPcap... uninstalling made it work, thanks!
  • Casey
    Casey over 8 years
    Use Process Explorer feature Find Handle or DLL to find the application that is using Packet.dll file. In my case it was same Netgear wifi USB adapter software.