Link to home
Start Free TrialLog in
Avatar of jeania
jeania

asked on

Login script problem

Over the past few weeks my old login script has been acting funny. This login script was written by a former employee and seems to have issues on occasions, so I'd like a new script. I'm not very familiar with writing scripts and any help would be appreciated.
The script is initialized with login.bat, which calls login.kix for added functionality. The login.bat is written as a batch file, the login.kix is written in Kixtart. I'd just like to clean this up and make it run more efficent. All help is appreciated.

I'm including the old script for those who might can help.

login.bat part:

net use H: /del
net use G: /DEL
net use P: /del
REM net use M: /del
net use W: /del

ipconfig /flushdns

gpupdate

w32tm /resync

net use W: \\***-DC02\%username%$

%0\..\Kix32.exe \\***.net\NETLOGON\login.KIX

%0\..\Kix32.exe \\***.net\NETLOGON\productID.kix

net localgroup administrators local_admins_sec /add

\\***-dc02\netlogon\IE20Blocker.cmd /B

REM at 00:00 cmd \\***-dc02\netlogon\sysnfo.bat

REM \\***-dc02\netlogon\***news.vbs

\\***-dc02\netlogon\audit.bat
:end


Kixtart  part:

If InGroup("Presidents_Sec")
 ?Executive Private Access Granted
   USE G: "\\fileserver\executiveprivate$" /PERSISTENT
   USE H: "\\fileserver\***$" /PERSISTENT
   USE P: "\\fileserver\public" /PERSISTENT
EndIF

IF InGroup("***_Sec")
  ?BFA Access Granted
   USE G:  "\\fileserver\***$" /PERSISTENT
   USE P:  "\\fileserver\public" /PERSISTENT
ENDIF
      
IF InGroup("SBS_Sec")
      ? "Your access to file shares is currenly limited"
ENDIF

IF InGroup("Domain_Admins_Sec")
 ?Domain Admin Access Granted
  USE H: "\\fileserver\***$" /PERSISTENT
  USE M: "\\fileserver\MIS$" /PERSISTENT
  USE P: "\\fileserver\public" /PERSISTENT
ENDIF

If ADDPRINTERCONNECTION ("\\***-dc2\Dell Laser Printer 5100cn PCL6") = 0
      ? "Added Printer Connection... Dell Laser Printer"
ENDIF

If ADDPRINTERCONNECTION ("\\***-dc2\CanoniR 2800") = 0
      ? "Added Printer Connection... Canon Printer"
EndIF

If ADDPRINTERCONNECTION ("\\***-dc2\Canon iR 2200-3300(FAX)") = 0
      ? "Added Fax Machine connection... Canon Fax Machine"
EndIF
Avatar of Bill Bach
Bill Bach
Flag of United States of America image

It might be helpful to know which part has problems, and what kind of problems it has.  "Fixing" the script is difficult if we don't know what is wrong with it.

Also, there is a second Kix script being called (productID.kix) that you didn't include, as well as a command script (IE20Blocker.cmd) and a batch file (audit.bat).  The other batch file (sysnfo.bat) and VBScript file (news.vbs) are currently commented out, and can be ignored, or at least removed from the login.bat file.
ASKER CERTIFIED SOLUTION
Avatar of jeania
jeania

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial