Solved Making Network Computers Visible In File Explorer


HDL

Well-known member
Member
Local time
6:00 AM
Posts
388
OS
Windows 11 Pro ver. 22H2
I have a small bat file that I got from this forum. I just recently learned how to make it run using the Task Scheduler. I have 4 desktop computers and 2 Laptops. None of my computers require a log on password. They just boot up saying Welcome - my name - then boot to the desktop. 3 desktops are Win 11 Pro and 1 is Win 10 Pro. 1 laptop is Win 11 Pro and 1 is Win 10 Home.

All my desktop computers run this bat file as told to on log in but neither laptop runs the bat file - not on log in or on start up. I mentioned all the above so you know what I am doing. I have never had any computer ask for a password and the only account on them is mine and my computer builder makes my account the administrator.

So does anyone have any idea why my laptops will not run this bat file as I am asking it to do in the Task Scheduler? Any ideas on how to force it to run?
 

My Computer

System One

  • OS
    Windows 11 Pro ver. 22H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    ACPI x64-based PC
    CPU
    12th Grn. Intel i7-12700K 3600 Mhz 12 Cores
    Motherboard
    ASUSTeK - Prime Z690-P WIFI
    Memory
    64 GB DDR5
    Graphics Card(s)
    NVIDIA GeForce GTX 1650
    Sound Card
    NVIDIA High Definition Audio
    Monitor(s) Displays
    ViewSonic
    Screen Resolution
    1920 x 1080
    Hard Drives
    HDS72252 5VLAT80 2 Tb ssd Hard drive
    PSU
    850 Watt Power Supply
    Case
    19" high desktop
    Cooling
    A lot of fans
    Keyboard
    Logitech
    Mouse
    Logitech
    Internet Speed
    500 Mg
    Browser
    FF
    Antivirus
    Windows Defendor & Malwarebytes
    Other Info
    2 Asus Blu-Ray burners - BW - 16D1HT
This is the bat file:
net stop "Function Discovery Resource Publication"



net start "Function Discovery Resource Publication"
 

My Computer

System One

  • OS
    Windows 11 Pro ver. 22H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    ACPI x64-based PC
    CPU
    12th Grn. Intel i7-12700K 3600 Mhz 12 Cores
    Motherboard
    ASUSTeK - Prime Z690-P WIFI
    Memory
    64 GB DDR5
    Graphics Card(s)
    NVIDIA GeForce GTX 1650
    Sound Card
    NVIDIA High Definition Audio
    Monitor(s) Displays
    ViewSonic
    Screen Resolution
    1920 x 1080
    Hard Drives
    HDS72252 5VLAT80 2 Tb ssd Hard drive
    PSU
    850 Watt Power Supply
    Case
    19" high desktop
    Cooling
    A lot of fans
    Keyboard
    Logitech
    Mouse
    Logitech
    Internet Speed
    500 Mg
    Browser
    FF
    Antivirus
    Windows Defendor & Malwarebytes
    Other Info
    2 Asus Blu-Ray burners - BW - 16D1HT
This is the bat file:
net stop "Function Discovery Resource Publication"



net start "Function Discovery Resource Publication"
make it autorun as admin and see if running it manually works:

::::::::::::::::::::::::::::::::::::::::::::
:: Automatically check & get admin rights V2
::::::::::::::::::::::::::::::::::::::::::::

@echo off
CLS
ECHO.
ECHO =============================
ECHO Running Admin shell
ECHO =============================

:init
setlocal DisableDelayedExpansion
set "batchPath=%~0"
for %%k in (%0) do set batchName=%%~nk
set "vbsGetPrivileges=%temp%\OEgetPriv_%batchName%.vbs"
setlocal EnableDelayedExpansion

:checkPrivileges
NET FILE 1>NUL 2>NUL
if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges )
:getPrivileges
if '%1'=='ELEV' (echo ELEV & shift /1 & goto gotPrivileges)
ECHO.
ECHO **************************************
ECHO Invoking UAC for Privilege Escalation
ECHO **************************************

ECHO Set UAC = CreateObject^("Shell.Application"^) > "%vbsGetPrivileges%"
ECHO args = "ELEV " >> "%vbsGetPrivileges%"
ECHO For Each strArg in WScript.Arguments >> "%vbsGetPrivileges%"
ECHO args = args ^& strArg ^& " " >> "%vbsGetPrivileges%"
ECHO Next >> "%vbsGetPrivileges%"
ECHO UAC.ShellExecute "!batchPath!", args, "", "runas", 1 >> "%vbsGetPrivileges%"
"%SystemRoot%\System32\WScript.exe" "%vbsGetPrivileges%" %*
exit /B

:gotPrivileges
setlocal & pushd .
cd /d %~dp0
if '%1'=='ELEV' (del "%vbsGetPrivileges%" 1>nul 2>nul & shift /1)

::::::::::::::::::::::::::::
::START
::::::::::::::::::::::::::::
REM Run shell as admin (example) - put here code as you like
ECHO %batchName% Arguments: %1 %2 %3 %4 %5 %6 %7 %8 %9
net stop "Function Discovery Resource Publication"
net start "Function Discovery Resource Publication"
 

My Computer

System One

  • OS
    Windows 11 Pro
  • Like
Reactions: HDL
make it autorun as admin and see if running it manually works:
I am not totally understanding you. The bat file I have now in the Task Scheduler is told to run with highest privileges and if I run it manually it does work.

Are you saying to use what you created above as a new bat file and replace the one I have now in the Task Scheduler? I am not at all familiar with doing these kind of things so please forgive me for having to ask questions. And also thank you very much for your help.
 

My Computer

System One

  • OS
    Windows 11 Pro ver. 22H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    ACPI x64-based PC
    CPU
    12th Grn. Intel i7-12700K 3600 Mhz 12 Cores
    Motherboard
    ASUSTeK - Prime Z690-P WIFI
    Memory
    64 GB DDR5
    Graphics Card(s)
    NVIDIA GeForce GTX 1650
    Sound Card
    NVIDIA High Definition Audio
    Monitor(s) Displays
    ViewSonic
    Screen Resolution
    1920 x 1080
    Hard Drives
    HDS72252 5VLAT80 2 Tb ssd Hard drive
    PSU
    850 Watt Power Supply
    Case
    19" high desktop
    Cooling
    A lot of fans
    Keyboard
    Logitech
    Mouse
    Logitech
    Internet Speed
    500 Mg
    Browser
    FF
    Antivirus
    Windows Defendor & Malwarebytes
    Other Info
    2 Asus Blu-Ray burners - BW - 16D1HT
I am not totally understanding you. The bat file I have now in the Task Scheduler is told to run with highest privileges and if I run it manually it does work.

Are you saying to use what you created above as a new bat file and replace the one I have now in the Task Scheduler? I am not at all familiar with doing these kind of things so please forgive me for having to ask questions. And also thank you very much for your help.
the one i posted above will auto-elevate when run. i just wanted to have you test it by double clicking to run, as you stated your .bat will not even run when launched manually. just a first step in troubleshooting.
 

My Computer

System One

  • OS
    Windows 11 Pro
  • Like
Reactions: HDL
the one i posted above will auto-elevate when run. i just wanted to have you test it by double clicking to run, as you stated your .bat will not even run when launched manually. just a first step in troubleshooting.
I think you misunderstood me. The bat file I have now runs perfectly when run manually both from the desktop shortcut or manually inside the Task Scheduler. I copied your code from above and made it a bat file. I ran it, and it too runs manually. So, since your code does run manually for me, should I direct the task I created in the Task Scheduler to it instead of the one I have now?
 

My Computer

System One

  • OS
    Windows 11 Pro ver. 22H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    ACPI x64-based PC
    CPU
    12th Grn. Intel i7-12700K 3600 Mhz 12 Cores
    Motherboard
    ASUSTeK - Prime Z690-P WIFI
    Memory
    64 GB DDR5
    Graphics Card(s)
    NVIDIA GeForce GTX 1650
    Sound Card
    NVIDIA High Definition Audio
    Monitor(s) Displays
    ViewSonic
    Screen Resolution
    1920 x 1080
    Hard Drives
    HDS72252 5VLAT80 2 Tb ssd Hard drive
    PSU
    850 Watt Power Supply
    Case
    19" high desktop
    Cooling
    A lot of fans
    Keyboard
    Logitech
    Mouse
    Logitech
    Internet Speed
    500 Mg
    Browser
    FF
    Antivirus
    Windows Defendor & Malwarebytes
    Other Info
    2 Asus Blu-Ray burners - BW - 16D1HT
my mistake. reread your op and you said "log in", not when logged on. sorry. when you create the task (with your original .bat), change the user from your username to SYSTEM and see if it runs as it is supposed to then.
 

My Computer

System One

  • OS
    Windows 11 Pro
my mistake. reread your op and you said "log in", not when logged on. sorry. when you create the task (with your original .bat), change the user from your username to SYSTEM and see if it runs as it is supposed to then.
I am not sure how to do that. There is only one account and it is my name. How do I change that and would it affect my network? Right now when a computer does not show up in File Explorer on my main machine, all I have to do is go to that computer and manually run that bat file and then it appears in the File Explorer on my main machine. Would changing the user name mess that up?

I googled how to change that user name so the only thing I am concerned about is if would mess up the network computers showing up in File Explorer.
 

My Computer

System One

  • OS
    Windows 11 Pro ver. 22H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    ACPI x64-based PC
    CPU
    12th Grn. Intel i7-12700K 3600 Mhz 12 Cores
    Motherboard
    ASUSTeK - Prime Z690-P WIFI
    Memory
    64 GB DDR5
    Graphics Card(s)
    NVIDIA GeForce GTX 1650
    Sound Card
    NVIDIA High Definition Audio
    Monitor(s) Displays
    ViewSonic
    Screen Resolution
    1920 x 1080
    Hard Drives
    HDS72252 5VLAT80 2 Tb ssd Hard drive
    PSU
    850 Watt Power Supply
    Case
    19" high desktop
    Cooling
    A lot of fans
    Keyboard
    Logitech
    Mouse
    Logitech
    Internet Speed
    500 Mg
    Browser
    FF
    Antivirus
    Windows Defendor & Malwarebytes
    Other Info
    2 Asus Blu-Ray burners - BW - 16D1HT
just change the user, type SYSTEM and check names. it'll auto match it to SYSTEM.
no it wont effect that
1739394306352.webp
 

My Computer

System One

  • OS
    Windows 11 Pro
just change the user, type SYSTEM and check names. it'll auto match it to SYSTEM.
no it wont effect that
View attachment 125213
I am concerned so I called my computer builder and asked if I could change my user name from my name to System. He said I couldn't do that because it would not boot up anymore. Maybe I am misunderstanding you as to what you want me to do. If I am creating a new user he said that was OK. But if that is the case, when it boots up would I have to pick which account to sign in from? If so, would that System account still have administrator privileges?

It just seems strange to me that my desktop computers all run that task but neither laptop does. There must be a reason but I can't find it any where on the NET. I did find something that may well be the problem. It says that not having a password for my account could cause this to happen. But again, it is only happening on the laptops. I'd rather continue the way I have for years now than change to having to use passwords to access my account.

In the meantime, I created a Task Scheduler task directing it to the bat file using your code. When it booted up it would not run it either. Again, this is only happening on my laptops.
 

My Computer

System One

  • OS
    Windows 11 Pro ver. 22H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    ACPI x64-based PC
    CPU
    12th Grn. Intel i7-12700K 3600 Mhz 12 Cores
    Motherboard
    ASUSTeK - Prime Z690-P WIFI
    Memory
    64 GB DDR5
    Graphics Card(s)
    NVIDIA GeForce GTX 1650
    Sound Card
    NVIDIA High Definition Audio
    Monitor(s) Displays
    ViewSonic
    Screen Resolution
    1920 x 1080
    Hard Drives
    HDS72252 5VLAT80 2 Tb ssd Hard drive
    PSU
    850 Watt Power Supply
    Case
    19" high desktop
    Cooling
    A lot of fans
    Keyboard
    Logitech
    Mouse
    Logitech
    Internet Speed
    500 Mg
    Browser
    FF
    Antivirus
    Windows Defendor & Malwarebytes
    Other Info
    2 Asus Blu-Ray burners - BW - 16D1HT
I am concerned so I called my computer builder and asked if I could change my user name from my name to System. He said I couldn't do that because it would not boot up anymore. Maybe I am misunderstanding you as to what you want me to do. If I am creating a new user he said that was OK. But if that is the case, when it boots up would I have to pick which account to sign in from? If so, would that System account still have administrator privileges?
no. in task scheduler, create the task and change the username that the task will run as.
1739395845748.webp
1739395850854.webp
 

My Computer

System One

  • OS
    Windows 11 Pro
  • Like
Reactions: HDL

My Computer

System One

  • OS
    Windows 11 Pro ver. 22H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    ACPI x64-based PC
    CPU
    12th Grn. Intel i7-12700K 3600 Mhz 12 Cores
    Motherboard
    ASUSTeK - Prime Z690-P WIFI
    Memory
    64 GB DDR5
    Graphics Card(s)
    NVIDIA GeForce GTX 1650
    Sound Card
    NVIDIA High Definition Audio
    Monitor(s) Displays
    ViewSonic
    Screen Resolution
    1920 x 1080
    Hard Drives
    HDS72252 5VLAT80 2 Tb ssd Hard drive
    PSU
    850 Watt Power Supply
    Case
    19" high desktop
    Cooling
    A lot of fans
    Keyboard
    Logitech
    Mouse
    Logitech
    Internet Speed
    500 Mg
    Browser
    FF
    Antivirus
    Windows Defendor & Malwarebytes
    Other Info
    2 Asus Blu-Ray burners - BW - 16D1HT
I believe I did what you said to do, please see attachment. After changing that to SYSTEM the bat file would not run manually within the Task Scheduler and it did not run when the computer booted up either.
TEST.webp
 

My Computer

System One

  • OS
    Windows 11 Pro ver. 22H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    ACPI x64-based PC
    CPU
    12th Grn. Intel i7-12700K 3600 Mhz 12 Cores
    Motherboard
    ASUSTeK - Prime Z690-P WIFI
    Memory
    64 GB DDR5
    Graphics Card(s)
    NVIDIA GeForce GTX 1650
    Sound Card
    NVIDIA High Definition Audio
    Monitor(s) Displays
    ViewSonic
    Screen Resolution
    1920 x 1080
    Hard Drives
    HDS72252 5VLAT80 2 Tb ssd Hard drive
    PSU
    850 Watt Power Supply
    Case
    19" high desktop
    Cooling
    A lot of fans
    Keyboard
    Logitech
    Mouse
    Logitech
    Internet Speed
    500 Mg
    Browser
    FF
    Antivirus
    Windows Defendor & Malwarebytes
    Other Info
    2 Asus Blu-Ray burners - BW - 16D1HT
ok. lets try this. delete that task. create a new task, set triggers, start a program and make it run this test.exe (i compiled your commands into an exe via autohotkey)
 

Attachments

My Computer

System One

  • OS
    Windows 11 Pro
  • Like
Reactions: HDL
I created the task again in Task Scheduler using the Test.exe. It runs manually from inside the task Scheduler, but it still doesn't run when the machine boots up. Thanks for trying.
 

My Computer

System One

  • OS
    Windows 11 Pro ver. 22H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    ACPI x64-based PC
    CPU
    12th Grn. Intel i7-12700K 3600 Mhz 12 Cores
    Motherboard
    ASUSTeK - Prime Z690-P WIFI
    Memory
    64 GB DDR5
    Graphics Card(s)
    NVIDIA GeForce GTX 1650
    Sound Card
    NVIDIA High Definition Audio
    Monitor(s) Displays
    ViewSonic
    Screen Resolution
    1920 x 1080
    Hard Drives
    HDS72252 5VLAT80 2 Tb ssd Hard drive
    PSU
    850 Watt Power Supply
    Case
    19" high desktop
    Cooling
    A lot of fans
    Keyboard
    Logitech
    Mouse
    Logitech
    Internet Speed
    500 Mg
    Browser
    FF
    Antivirus
    Windows Defendor & Malwarebytes
    Other Info
    2 Asus Blu-Ray burners - BW - 16D1HT
I created the task again in Task Scheduler using the Test.exe. It runs manually from inside the task Scheduler, but it still doesn't run when the machine boots up. Thanks for trying.
try this .exe. if it runs manually, i dont see why it won't run at logon. i made the cmd window stay open post command this time. im curious if it is just disappearing too fast for you to see it at logon
 

Attachments

My Computer

System One

  • OS
    Windows 11 Pro
  • Like
Reactions: HDL
try this .exe. if it runs manually, i dont see why it won't run at logon. i made the cmd window stay open post command this time. im curious if it is just disappearing too fast for you to see it at logon
I can almost guarantee it is not going too fast for me to see. I had to run the original bat file manually as I always have to get that computer to be visible on my network. My original bat file also ran manually but would not run at log on from the task scheduler. I will give it a try though and again thank you.
 

My Computer

System One

  • OS
    Windows 11 Pro ver. 22H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    ACPI x64-based PC
    CPU
    12th Grn. Intel i7-12700K 3600 Mhz 12 Cores
    Motherboard
    ASUSTeK - Prime Z690-P WIFI
    Memory
    64 GB DDR5
    Graphics Card(s)
    NVIDIA GeForce GTX 1650
    Sound Card
    NVIDIA High Definition Audio
    Monitor(s) Displays
    ViewSonic
    Screen Resolution
    1920 x 1080
    Hard Drives
    HDS72252 5VLAT80 2 Tb ssd Hard drive
    PSU
    850 Watt Power Supply
    Case
    19" high desktop
    Cooling
    A lot of fans
    Keyboard
    Logitech
    Mouse
    Logitech
    Internet Speed
    500 Mg
    Browser
    FF
    Antivirus
    Windows Defendor & Malwarebytes
    Other Info
    2 Asus Blu-Ray burners - BW - 16D1HT
as it is an .exe, you could also place a shortcut to it in "Shell:Startup" folder...
 

My Computer

System One

  • OS
    Windows 11 Pro
as it is an .exe, you could also place a shortcut to it in "Shell:Startup" folder...
Well I guess I am not going to be able to test the second one. My Microsoft Defender will not allow it to be opened. It has, for some reason, quarantined it twice.
 

My Computer

System One

  • OS
    Windows 11 Pro ver. 22H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    ACPI x64-based PC
    CPU
    12th Grn. Intel i7-12700K 3600 Mhz 12 Cores
    Motherboard
    ASUSTeK - Prime Z690-P WIFI
    Memory
    64 GB DDR5
    Graphics Card(s)
    NVIDIA GeForce GTX 1650
    Sound Card
    NVIDIA High Definition Audio
    Monitor(s) Displays
    ViewSonic
    Screen Resolution
    1920 x 1080
    Hard Drives
    HDS72252 5VLAT80 2 Tb ssd Hard drive
    PSU
    850 Watt Power Supply
    Case
    19" high desktop
    Cooling
    A lot of fans
    Keyboard
    Logitech
    Mouse
    Logitech
    Internet Speed
    500 Mg
    Browser
    FF
    Antivirus
    Windows Defendor & Malwarebytes
    Other Info
    2 Asus Blu-Ray burners - BW - 16D1HT
Back
Top Bottom