Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

scripters help needed

Thread Tools
 
Search this Thread
 
Old 19 September 2003, 11:57 AM
  #1  
shunty
Scooby Regular
Thread Starter
 
shunty's Avatar
 
Join Date: Aug 2001
Location: wakefield
Posts: 2,082
Likes: 0
Received 0 Likes on 0 Posts
Unhappy

I posted a thread a few days ago & got only 1 response....

please has anyone got a script/batch file etc that will detect if a user is logged onto a specific domain ??
do you need to call from the "set" command to interrogate the current users status or can you just use another %something% variable ??

any help appreciated with this as it's to help with a remote user virus issue we have at the mo.

could be worth your while for 15mins scripting

shunty
Old 19 September 2003, 12:09 PM
  #2  
gareth
Scooby Regular
 
gareth's Avatar
 
Join Date: Jan 1999
Posts: 572
Likes: 0
Received 0 Likes on 0 Posts
Post

how about %USERDNSDOMAIN% or %USERDOMAIN% ? They both show up in my environment and I am logged onto a W2K/AD network...

Cheers,
Gareth
Old 19 September 2003, 01:49 PM
  #3  
David_Wallis
Scooby Regular
 
David_Wallis's Avatar
 
Join Date: Nov 2001
Location: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Posts: 15,239
Likes: 0
Received 1 Like on 1 Post
Post

or %logonserver%

it would be easier to explain the problem then there may be an alternative way..

David
Old 19 September 2003, 02:20 PM
  #4  
shunty
Scooby Regular
Thread Starter
 
shunty's Avatar
 
Join Date: Aug 2001
Location: wakefield
Posts: 2,082
Likes: 0
Received 0 Likes on 0 Posts
Post

lads, maybe you don't understand me...
I know what commands can run to find out username, userdomain etc...but what ACTUAL commands/script lines do I need to find out if:

1) current_user=mydomain
2) and_then_copy_some_files_to_directory

I can do 2 obviously.....but do i need IF statements etc...what's the exact syntax ?? a simple batch file will do, the one I tried just runs it regardless of whether part of the domain or not, so I am missing something.

shunty
Old 19 September 2003, 02:30 PM
  #5  
shunty
Scooby Regular
Thread Starter
 
shunty's Avatar
 
Join Date: Aug 2001
Location: wakefield
Posts: 2,082
Likes: 0
Received 0 Likes on 0 Posts
Post

IF %USERDOMAIN%==DOMAIN_1 "doesn't seem to be detecting domain properly, am I missing something" ??

the copying, deleting files etc is the easy bit.

shunty
Old 19 September 2003, 03:32 PM
  #6  
shunty
Scooby Regular
Thread Starter
 
shunty's Avatar
 
Join Date: Aug 2001
Location: wakefield
Posts: 2,082
Likes: 0
Received 0 Likes on 0 Posts
Thumbs up

all done now....

cheers anyway

shunty
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
MH-Racing
Subaru Parts
18
18 October 2015 04:49 PM
taylor85
Wanted
2
13 September 2015 04:57 PM
AzzDSM
Engine Management and ECU Remapping
4
13 September 2015 03:59 PM
robbie1988
Wanted
2
13 September 2015 09:25 AM
Scooby-Doo 2
Wheels And Tyres For Sale
1
09 September 2015 06:51 PM



Quick Reply: scripters help needed



All times are GMT +1. The time now is 08:14 AM.