1,810 reputation
1127
bio website jard.co.uk/james.shtml
location United Kingdom
age 37
visits member for 5 years, 5 months
seen Dec 19 at 10:34

You make everything, Groovy


Dec
8
comment Batch file match start of machine name
In fact to further simplify the whole thing can be written on one line as: FOR %%A IN (UKD UKL USD) DO IF %%A==%computername:~0,3% RunMyCommand thanks for pointing me in the right direction RainyRat.
Dec
8
awarded  Scholar
Dec
8
accepted Batch file match start of machine name
Dec
8
comment Batch file match start of machine name
Ah brilliant, that's what I was missing. What's the colon tilde bit there, is that a substring type thing or a simple regex? I''ve put in your two lines followed by this bit to run the command: FOR %%A IN (UKD UKL USD) DO IF %%A==%FirstThreeChars% RunMyCommand and all is good :)
Dec
8
asked Batch file match start of machine name
Nov
30
comment How can my my batch file determine whether I'm on my work network?
Vista and Win7 have intelligence to detect what type of network they're plugged into and do stuff differently depending, presumably they've got that sort of variable. XP doesn't have that kind of network discovery intelligence built-in. Checking the machines IP address, address range, subnet address or default gateway sound like the most direct ways to do this.
Nov
25
comment How to determine the hostname from an IP address in a Windows network?
NBTSTAT does rely on having NetBIOS loaded and running, which is often switched off in larger organisations with their own AD & DNS infrastructure. Probably a safe assumption here though with a 50 machine workgroup.
Nov
16
awarded  Enthusiast
Nov
11
answered Protecting files from system administrator
Nov
10
answered xcopy is illogical?
Nov
9
comment Is it possible to manage file system access per computer (or per container)?
@Evan - true but when I answered there was no mention of servers in the question. It sounded like there were a group of PCs which each had a particular folder on them that needed securing. Using GPOs to enforce file system security on clients is a pretty standard thing to do, lots of people do it to ensure things like Program Files folders are locked down properly, whilst certain sub-folders for badly written apps are opened up to certain groups, etc.
Nov
8
answered Is it possible to manage file system access per computer (or per container)?
Nov
4
comment Transferring domains when registered owner's email address is incorrect
£20 isn't a huge amount as a one-off cost to retain domains that can represent you for years to come. How much does your annual registration and hosting bill come to? Personally I'd just pay it to get rid of the hassle.
Nov
4
answered install msi using group policy
Oct
30
revised Login with usb drive
slight rewording
Oct
29
comment Steps to take to protect against the “unthinkable”
Why give anyone THE root/admin password to a domain/machine? Surely you'd be creating specific admin accounts for each person that needs them, for audit-ability if nothing else. Also, if you don't trust them enough to give them an admin account, you do trust them to create one themselves unsupervised?
Oct
29
answered Login with usb drive
Oct
26
answered Adobe Reader won't launch when logged into network user accounts (Open Directory)
Oct
26
answered AD query to see what PCs a user has logged onto recently
Oct
22
comment firefox fails to pass ntlm to apache2 running authenntlm on Centos 5.1
If you remove the NTLM trust entry from Firefox, do you get prompted for a password, if so does entering your domain login (in the form "domain\username") and password work?