Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help with netlogon.bat

Featured Replies

Hello all,

I have a netlogon.bat batch script, which I want to run some commands upon login for all hosts except one (computername: PC2). Currently I have the following script:

if "%COMPUTERNAME%" == "PC2" goto OUT
@del c:\windows\*.pwl
regedit /s \\myserver\netlogon\nocache.reg

:OUT
echo exiting
:END

which doesn't work the way I want, it runs 'del' & 'regedit' for all hosts.

Any batch script wizards around here ?

(btw. all hosts run win98 & the server runs samba on linux)


That code does what you want it to do when I run it.

I can see nothing wrong with the code.

Are you sure the pc you want to exclude has the correct name?

goto a command prompt and type "set" (i think that works in 98, been a while! )

Hope that helps.

  • Author

I triple-checked & it doesn't work the way I want.

$ net config 
ComputerName                  \\PC2

I tried both 'PC2' & '\\PC2' on my script but it does exactly the same : it runs the 'del' & 'regedit' commands on all boxes, including pc2.

Anyone ?

  • 1 month later...

Hi venim,

I am not sure but I think you don't have to use the quotes, try this line:

if %computername%==PC2 (Echo.This is PC2) Else Echo.This is not PC2

Greez, Sie Tjin Kian

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.