IT Technical Support for Developers

Windows


0x00000040, How to Fix Win 11 Printer Sharing to win 10 /win 7

Operation Could Not Be Completed Error 0x00000040 The Specified Network Name Is No Longer Available

How can I fix Printer Error 0x00000040?
Windows 11 Network Printer Sharing to Windows 10 / Windows 8 / Windows 7
It’s a common error that users face if a third-party printer driver is installed on the print server. Fortunately, you can fix this by following some simple steps.

Printer Error 0x00000040 can be fixed by following some simple steps.
What causes Operation could not be completed (error 0x00000040)?

Windows 10/11 doesn’t allow users to install a third-party printer driver on the print server. You need to change the Group Policy settings or tweak the Registry to resolve the issue. The other reasons for this error could be:

1.Point and Print Restrictions policy
2.Pending print jobs in Print Spooler
3.Printer Driver issues.
Run Printer Troubleshooter

1. Press Windows Key + I to open Settings.
2. Scroll down and select Troubleshoot > Other Troubleshooters.
3. Click on Run beside Printer.
4. Once the process is complete, restart your device to see if the printer error has been resolved.
Modify Group Policy Settings

GP Settings for 0x00000040 Kernel-mode drivers operate in kernel mode and have unlimited access to hardware and memory. But sometimes, the kernel-mode driver’s policy can malfunction due to corrupted drivers. Disable the policy and check if the error is fixed.
Disable the Point and Print using Registry Editor

1. Press the Windows key + R to open the Run dialog box.
2. Type regedit and hit Enter.
3. Navigate to the following path :HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows NT\Printers\PointAndPrint

4. right-click on InForest and select Modify.
5. Now enter the Value data as 0 and click Ok to save the changes.
6. In the same way, change the value data of Restricted and TrustedServers to 0.
7. Close the Registry Editor and restart your computer.
Update Printer driver

Update your Printer driver and see. Keeping your drivers up-to-date is very important. Although Optional Updates do update some of the drivers, some require you to download the driver manually from the manufacturer’s website.



Windows 10 printer error 0x00000709

Printer Error 0x00000709 when you try to Connect, or Set as Default Printer

Many Windows users are reporting this 0x00000709 problem as well. it’s possible to fix it.
One of the most annoying issues with a Printer is the one where it refuses to get set up or configured on your computer. When it has configuration issues, one of the common errors that it throws is 0x00000709. This occurs if there is already a default printer set and configured or Windows does not want to add or configure the new printer.

Fix for Printer Error 0x00000709

It will support - Win7 / Win8 / Windows10

IMPORTANT: Modifying the registry in your computer could cause irrecoverable error if the modification is done incorrectly, therefore, it is very important for you to back up your registry first.
Step 1: Hit the WINKEY + R button combination to launch the Run utility, type in regedit and hit Enter.
Once Registry Editor opens, navigate to the following key location
Step 2: HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows
Step 3: Now, under the Windows folder, double-click on the file named Device on the right-side pane.
Add the name of your printer inside the Value Data

Example Priner Name / Device Name
HP 1020
canon lbp 2900
.
.
.

Add Printer Name
if the printer is not shared printer you just enter printer name alone
Step 4: Click OK to save the change.
Note: If you encounter this sort of error "Cannot edit Device: Error writing the value’s new contents", please follow the steps below to set the permission of the key.
Step 5: Right Click on the windows folder
refere the path :HKEY_CURRENT_USER\Software\Microsoft\WindowsNT\CurrentVersion\Windows.
Click "Permission" Option from the Popup Menu.
Regedit Permission

Step 6: Tick the box Allow for Full Control and Read,
then click Apply and click OK to save the change. reffer above Picture of "Permissions for Windows"
Step 7: Once you have done that, right-click on the file named as UserSelectedDefault and select Rename and then rename it to your printer’s name.

Step 8: Reboot your computer for the changes to take effect.
Step 9:After Rebooting you need to update your printer driver for it to work more smoothly
Note:- Once you have added the printer, remember to reverse the Permission changes you made. This is in the interest of security.

Printer Error 0x00000709 when you try to share a printer

Step 1 : Check with the printer server system in sharing mode Example : in run command type "\\Your Printer Server Name" if it works and you can able to see all the shared folders and printers then do the followings

enable your system network wins NEBIOS over TCP and try for printer sharing.

Step 2. In run command type "\\ IP number of the Printer Server" if it works and you can able to see all the shared folders and printers, then you can install all the shared printer in your system.
if you are not able to install a shared printer, all above steps are faild, and then do the followings

In server side
Step 1: Check for TCP/IP => Inernet Protocol Version 4

Step 2: Configure Manual IP instead of Automatically IP Assign.

Step 3: Check with your Printer server Name, (Compurter or PC Name)
It should not have a long name or special characters or Numbers alone
set relavent name for it.
Allowing server machine to use filesharing with itself via the DNS Alias

Step 4: Check / Configure Network Sharing Rights for the printer (and Update Printer Driver).

Step 5: in Client PC using run command type "\\IP number of Printer Server"

Step 6: now you are able to view all the shared folders and printers to Install.
All the best!



PHPMailer Enable 2FA Send Mail with 2 Step Authentication

How to send mail using PHP mailer if two factor authentication?

2 Step Verification

Gmail 2 steps verification

To send emails using PHPMailer with 2-factor authentication (2FA), you'll need to generate an "App Password" or set up OAuth2. Instead of your regular password, use the App Password in PHPMailer's settings.

Steps to Create App Password

Enable 2FA: Make sure 2FA is enabled in your Google Account.

Create a custom app in your Gmail security settings.
Step 1 Click Google Apps icon (right side top near user logo)
Step 2 Click Account
Step 3 Click Security Menu from left side
Step 4 Type "App password" in the search field
Step 5 Click "App Password" Link
Step 6 Enter the App Name as PHPMailer and submit
Step 7 You will get App Password.(It will generate a token to use in the App )

This is what you'll use in PHPMailer.

Sample Code

$email = new PHPMailer(true);

$email->IsSMTP(); // Use SMTP
$email->Host= 'smtp.gmail.com'; // Sets SMTP server

$email->SMTPDebug = 0; // 2 to enable SMTP debug information
$email->Debugoutput = 'html';
$email->SMTPAuth = TRUE; // enable SMTP authentication
$email->SMTPSecure = "SSL"; //Secure conection
$email->Port = 587; // set the SMTP port
$email->SMTPOptions = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
);

$email->Username = 'your_email@gmail.com'; // Your Gmail address
$email->Password = 'your_app_password'; // The App Password
$email->setFrom('your_email@gmail.com', 'Your Name');
$email->addAddress('recipient@example.com', 'Recipient Name');
$email->Subject = '2FA Test Email';
$email->Body = 'This is 2 Step Verification Mail Sent by PHPMailer.';

if ($email->send()) {
echo 'Message sent!';
} else {
echo 'Mailer Error: ' . $mail->ErrorInfo;
}

Use the token as password in combination with your full Gmail account and two factor authentication will not be required.

How to enable two factor authentication in Gmail







Related Links...

How to get Windows 11 without TPM 2.0


Windows 11 How to install on unsupported hardware


Windows 10 printer sharing error 0x0000011b FIX


Windows 11 Upgrade from Windows 10 - A Free Upgrade


Windows 10 printer sharing error 0x0000011b


Windows 11 error code 0x800f0950


How do I fix Windows Update 11 error?


Win 11 an existing connection was forcibly closed (OS error 10054)


How do I fix error 0xC1900101?


Upgrade from Windows 7 to Windows 10 for free


Windows 11 How to Launch Task Manager




Latest Post

Tally Prime 6.2 What is new

/Tally Integration Capabilities

Lucy Edit AI - Free AI Video Editor Online

/Artificial Intelligence AI

Rajinikanth with a salt-and-pepper beard wearing a stylish suit AI Vid

/Artificial Intelligence AI

How to generate Nano Banana 3D Figurine Image

/Artificial Intelligence AI

AI What is Next

/Artificial Intelligence AI