Login script Windows 2003 KIX32

TechEli
TechEli used Ask the Experts™
on
Good morning,
I need to create a script with the following characteristics:
Two people in particular and if they connect only to a specific machine

I tried the following, but it gives me error:

IF @USERID = 'Fores' OR @USERID = 'Tom' AND (@WKSTA,4)="W209"
    USE Z: "\\srvapp\app"
EndIf
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2011

Commented:
Hi,

And if you try this:
IF @WKSTA="W209"
  IF @USERID = 'Fores' OR @USERID = 'Tom'
    USE Z: "\\srvapp\app"
  ENDIF
ENDIF
Commented:
IF ( (@USERID="Fores" OR @USERID="Tom") AND @WKSTA="W209")=TRUE
      USE Z: "\\srvapp\app" /PERSISTENT
EndIf

Author

Commented:
I tested this script:

 IF ((@ USERID = "Fores" OR @ USERID = "Tom") AND @ WKSTA = "W209") = TRUE
       USE Z: \ \ srvapp \ app "/ PERSISTENT
 EndIf

 It works, but does not respect the machine. Connect to any machine and I mapped the drive
Acronis in Gartner 2019 MQ for datacenter backup

It is an honor to be featured in Gartner 2019 Magic Quadrant for Datacenter Backup and Recovery Solutions. Gartner’s MQ sets a high standard and earning a place on their grid is a great affirmation that Acronis is delivering on our mission to protect all data, apps, and systems.

Author

Commented:
Hi, Tnx MikieS,

The correct script:

 IF ((@ USERID = "Fores" OR @ USERID = "Tom") AND @ WKSTA = "W209") = 1
       USE Z: \ \ srvapp \ app "/ PERSISTENT
 EndIf

Author

Commented:
Tnx

Commented:
Very welcome!

(Sorry, my scripts all contain variables TRUE=1 FALSE=0 at the beginning!  I missed it out!)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial