Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Login scripts: .vbs, .bat, or other?

Posted on 2008-10-23
6
298 Views
Last Modified: 2008-10-30
As a part of improving our AD architecture, as well as security, we've gotten into a philisophical debate about the best scripting technique to use for drive mapping and other calls to be made at login.  Many of these actions require conditional calls (e.g., based on group membership).

I need opinions & supporting documentation for using batch files, vbs scripts, creative use of group policy, or any other method.  Please assume that a high level of expertise exists fo accomplish either.

I have a strong opinion, but I need the frank opinion from you.

Thx

0
Comment
Question by:artthegeek
6 Comments
 
LVL 2

Accepted Solution

by:
calepantke earned 100 total points
ID: 22785391
The best method is going to be the method that gives you the most flexibility with the greatest security. Batch files are simply not as flexible as VBScript, and neither is group policy. Group policy is useful so a combination of group policy and vb scripting is beneficial. 
I would start thinking about using powershell for everything however.
http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx
0
 
LVL 18

Assisted Solution

by:BSonPosh
BSonPosh earned 100 total points
ID: 22785539
RE: Powershell, It is not fast enough in V1 for login scripts, but V2 is going to be out soon and it is MUCH faster. If you would still like to use Powershell for logon scripts SpecOps has some great software http://www.specopssoft.com
0
 
LVL 3

Assisted Solution

by:Angelized
Angelized earned 100 total points
ID: 22785683
I would go for VBS, You have ADSI, WMI, registry, File system Object support bultin. Without having to user 3rd party software to do all these task.
You can also create a VBS with all fucntion (include) and make it really clear
I don't argue this can't be done with CMD or Bat, but IMHO VBS is simply cleaner and also you can encrypt it if you dont want your lamba users to open it.   (thought, the encryption can be unencrypted online :)  
 
 
 
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 18

Assisted Solution

by:exx1976
exx1976 earned 100 total points
ID: 22786662
VBS here
0
 
LVL 65

Assisted Solution

by:RobSampson
RobSampson earned 100 total points
ID: 22790670
+1 for VBS....

Things can get quite drawn out in VBS, but sometimes there are DOS tools that do things quicker, so I will call a DOS program *with* VBS to get results, such as copying files with xcopy.

On the other hand, PowerShell does shorten code alot, but I find it's learning curve a bit steeper, but it's complexity can also be your friend.

Regards,

Rob.
0
 
LVL 3

Author Comment

by:artthegeek
ID: 22842831
Thank you all - vbscript is what I've used as a mainstay for a while.  I hope your feed back will help make a case to the team here.

I will also look further into Powershell 2 - a new language to learn.

Thanks again.
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question