+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 22
Windows Server 2000/2003 Thread, Learning Scripting in Technical; Hi there i'm looking at learning a few new things and wanted to know how to create scripts. Things like ...
  1. #1

    Join Date
    Aug 2009
    Posts
    25
    Thank Post
    2
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Learning Scripting

    Hi there

    i'm looking at learning a few new things and wanted to know how to create scripts. Things like startup/logon scripts for various things.

    Is there anywhere at all that tells you how to start scripting or any book thats a good beginners guide?

    My current boss just says he cobbles them together from other peoples scripts off the internet but i'd like to understand how to write them an what things mean.

    Thanks

  2. #2

    mattx's Avatar
    Join Date
    Jan 2007
    Posts
    9,236
    Thank Post
    1,057
    Thanked 1,067 Times in 624 Posts
    Rep Power
    740
    Quote Originally Posted by darkmanx View Post
    Hi there

    i'm looking at learning a few new things and wanted to know how to create scripts. Things like startup/logon scripts for various things.

    Is there anywhere at all that tells you how to start scripting or any book thats a good beginners guide?

    My current boss just says he cobbles them together from other peoples scripts off the internet but i'd like to understand how to write them an what things mean.

    Thanks
    I am all self taught [ which means I have really bad habits ] - but I would start at the very basic level of batch stuff, then work your way to say VBS, WSH, Powershell, Kix - there are loads of others and you will find your favorite. My favorite is AutoIT and I tend to do most things in that although I must get down and start doing some powerhshell at some point - but at the moment I can't be arsed....

    http://www.robvanderwoude.com/
    http://www.robvanderwoude.com/books.php

    Is a good starting point.

    Books which I use and have learnt a great deal from:

    Windows Administration at the command line
    Windows Powershell programming
    Windows Admin Scripting Little Black Book, Second Edition

    Happy scripting.
    Last edited by mattx; 23rd February 2010 at 03:43 PM.

  3. #3

    Join Date
    Dec 2008
    Location
    Medway Towns
    Posts
    147
    Thank Post
    27
    Thanked 20 Times in 19 Posts
    Rep Power
    15
    As a reference I've found this site ( WiseSoft - Resources for IT Professionals ) to be helpful.

    They also have a Script Builder (which is what your trying to avoid but is useful nonetheless)

  4. #4

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,680
    Thank Post
    3,210
    Thanked 1,030 Times in 955 Posts
    Rep Power
    361

  5. #5

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,786
    Thank Post
    272
    Thanked 1,130 Times in 1,026 Posts
    Rep Power
    348
    is this not what edugeek is for? have a play if you think it should work and it doesnt then ask one of the very kind people on here. I have taught myself alot of it from other edugeekers helping me when i am trying to put them together. i have just started moving onto PHP which is even more complicated!

  6. #6
    Gerry's Avatar
    Join Date
    Jun 2007
    Location
    North Wales
    Posts
    431
    Thank Post
    60
    Thanked 38 Times in 35 Posts
    Rep Power
    24
    For VBS I use this: VbsEdit - Award-winning VBScript Editor - VBS editor - VBScript debugger - VBS debugger or this: .:: NOTEPAD++ ::. which also supports many other scripting languages.
    VbsEdit comes with a script repository which is appears to be mostly taken from Microsoft's Script Center

    You might find this VBScript Tutorial useful though it's more geared towards the web.

    Microsoft have their own guide and reference: VBScript

    Three tips for scripting/programming:
    1. Keep your code clean and easily readable - I use indents a lot so I can easily see the blocks/loops/conditionals etc...
    2. Use comments. Give each function/subroutine a quick description of what it does and comment complex statements. Don't be afraid to go overboard. You can always trim or remove them once your happy with your script.
    3. Debugging - with complex VBS I usually use message boxes to display what's being held in variables so I can check the program is doing what it's supposed to. I comment them with "debug" so I can easily find and remove them afterwards.

  7. #7

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,680
    Thank Post
    3,210
    Thanked 1,030 Times in 955 Posts
    Rep Power
    361
    Quote Originally Posted by Gerry View Post
    For VBS I use this: VbsEdit - Award-winning VBScript Editor - VBS editor - VBScript debugger - VBS debugger or this: .:: NOTEPAD++ ::. which also supports many other scripting languages.
    VbsEdit comes with a script repository which is appears to be mostly taken from Microsoft's Script Center

    You might find this VBScript Tutorial useful though it's more geared towards the web.

    Microsoft have their own guide and reference: VBScript

    Three tips for scripting/programming:
    1. Keep your code clean and easily readable - I use indents a lot so I can easily see the blocks/loops/conditionals etc...
    2. Use comments. Give each function/subroutine a quick description of what it does and comment complex statements. Don't be afraid to go overboard. You can always trim or remove them once your happy with your script.
    3. Debugging - with complex VBS I usually use message boxes to display what's being held in variables so I can check the program is doing what it's supposed to. I comment them with "debug" so I can easily find and remove them afterwards.
    ref debugging when dealing with the file system object ( FSO ) I used a text file to output what files / folders it found and also output which ones it should of deleted as text data so it didnt actually delete the files so I could get the script to work as I wanted (more or less ) before trying it
    Last edited by mac_shinobi; 23rd February 2010 at 04:20 PM.

  8. #8

    Join Date
    Aug 2005
    Location
    London
    Posts
    3,154
    Thank Post
    114
    Thanked 527 Times in 450 Posts
    Blog Entries
    2
    Rep Power
    123
    At the risk of starting a religious war, the best starting point is the Microsoft scripting site - Script Center

    They ought to know how to use their scripting technologies :-)

  9. Thanks to srochford from:

    mac_shinobi (23rd February 2010)

  10. #9

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,680
    Thank Post
    3,210
    Thanked 1,030 Times in 955 Posts
    Rep Power
    361
    Quote Originally Posted by srochford View Post
    At the risk of starting a religious war, the best starting point is the Microsoft scripting site - Script Center

    They ought to know how to use their scripting technologies :-)
    lol @ part highlighted in bold

    I put the computer performance one because I use that a lot and it has examples which are more or less walked through numerically etc and it has a lot of examples with ref to wmi, fso, etc
    Last edited by mac_shinobi; 23rd February 2010 at 04:28 PM.

  11. #10


    Join Date
    Jul 2007
    Location
    Rural heck
    Posts
    2,662
    Thank Post
    120
    Thanked 434 Times in 353 Posts
    Rep Power
    126
    SS64.com Command line reference is always worth a look.

  12. #11


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339
    At the risk of starting a religious war,
    The best thing would be to start with a platform independent language such as Python, because what you learn there will apply to Windows, OSX, Unix, Linux which greatly broadens your horizons.


    My current boss just says he cobbles them together from other peoples scripts off the internet
    That's what Open Source code is all about - someone writes some code, and we are all free to use it and adapt it.

  13. #12


    Join Date
    Jul 2007
    Location
    Rural heck
    Posts
    2,662
    Thank Post
    120
    Thanked 434 Times in 353 Posts
    Rep Power
    126
    Quote Originally Posted by CyberNerd View Post
    The best thing would be to start with a platform independent language such as Python, because what you learn there will apply to Windows, OSX, Unix, Linux which greatly broadens your horizons.




    That's what Open Source code is all about - someone writes some code, and we are all free to use it and adapt it.
    No, start with Batch, because it's easy.

  14. #13

    mattx's Avatar
    Join Date
    Jan 2007
    Posts
    9,236
    Thank Post
    1,057
    Thanked 1,067 Times in 624 Posts
    Rep Power
    740
    Quote Originally Posted by K.C.Leblanc View Post
    No, start with Batch, because it's easy.
    Quite right - [ I stated this in my first posting on this ] - it will give you a good understanding to start with, just DON'T use GOTO - learn how to use loops etc otherwise you will end up with spaghetti code - and trust me you don't want to go there....

  15. #14

    dhicks's Avatar
    Join Date
    Aug 2005
    Location
    Knightsbridge
    Posts
    5,613
    Thank Post
    1,229
    Thanked 772 Times in 670 Posts
    Rep Power
    234
    Quote Originally Posted by darkmanx View Post
    Things like startup/logon scripts for various things. <snip> My current boss just says he cobbles them together from other peoples scripts off the internet but i'd like to understand how to write them an what things mean.
    That sounds like a perfectly good way to start - pick some real task you need to actually do ("learning" tasks really don't work outside a formal classroom environment for programming) and do it, even if you cobble together lines pasted from the Internet someplace. Then figure out how your script works, line by line - follow your program through as if you're the computer executing the code.

    --
    David Hicks

  16. #15

    Join Date
    Aug 2009
    Posts
    25
    Thank Post
    2
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    brilliant, thanks everyone for the advice some good information there and some great links to work through. Now all I need is some time.....lol

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. New to scripting, need help
    By speckled in forum Scripts
    Replies: 1
    Last Post: 22nd November 2009, 08:09 AM
  2. os x scripting
    By mac_shinobi in forum Mac
    Replies: 5
    Last Post: 22nd August 2008, 09:30 AM
  3. Scripting and msi's
    By stu in forum How do you do....it?
    Replies: 5
    Last Post: 26th June 2008, 06:47 PM
  4. Printer Scripting
    By dave.81 in forum How do you do....it?
    Replies: 2
    Last Post: 23rd April 2008, 12:50 PM
  5. New to scripting
    By FN-GM in forum Scripts
    Replies: 26
    Last Post: 10th August 2007, 10:31 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •