Options

VBScript

DevilsbaneDevilsbane Member Posts: 4,214 ■■■■■■■■□□
Does anyone know a good method to learn VBscript? I see that there is an assortment of books that claim to do it, but I would like to know if someone has a personal experience with one of them.

I also see the CBT Nuggets has a video series, but I can't see spending $199 to learn vbscript.

Any tips?
Decide what to be and go be it.

Comments

  • Options
    dynamikdynamik Banned Posts: 12,312 ■■■■■■■■■□
    Is there a reason you're trying to learn vbs instead of powershell?
  • Options
    DevilsbaneDevilsbane Member Posts: 4,214 ■■■■■■■■□□
    I have a dislike of powershell. I like using the command prompt and batch files, and from time have used vbscripts.

    My dislike comes from an idiot teacher of mine who was determined on teaching powershell in his xp (70-270) class, probably because he didn't know how to teach xp. The problem with that was, he also didn't know how to use powershell.

    Another reason I favor .bat and vbscript, is that it can be executed on all windows systems.
    Decide what to be and go be it.
  • Options
    PashPash Member Posts: 1,600 ■■■■■□□□□□
    Devilsbane wrote: »
    I have a dislike of powershell. I like using the command prompt and batch files, and from time have used vbscripts.

    My dislike comes from an idiot teacher of mine who was determined on teaching powershell in his xp (70-270) class, probably because he didn't know how to teach xp. The problem with that was, he also didn't know how to use powershell.

    Another reason I favor .bat and vbscript, is that it can be executed on all windows systems.

    There are many system administrators who will advise against this. In all honesty powershell is the first real shell for Windows but it is now widely accepted as the way forward for windows based shell scripting. I cannot express how easy it is to pick up and how useful it is to know. I prefer it x10 more than vbscript and this comes from someone who was learning VB and turbo pascal to write silly little apps in college (which was almost 10 years ago!).

    Here are fundamental reasons why you should pick up powershell:-

    - Exchange 2007/2010 is built on it, literally. If you learn powershell you will find yourself making a doddle of everything exchange and there are some really really cool third party free apps to help with administration and script editing (powergui for one).

    - Smells of C#. object notations, error handling (in v2) are all a kindle to c#. This is so handy if you ever decide to write mini apps for your impressed boss, .net framework for windows and mono for cross platform open source goodness. You learn powershell and c# will look so simular!

    - It's a shell.....come on, it's a flaming shell! Great remoting features in v2 as well which makes administration of remote systems very nice.

    If you are still crazy and decide to go with vbscript you wan't your head looking at :D

    Pash
    DevOps Engineer and Security Champion. https://blog.pash.by - I am trying to find my writing style, so please bear with me.
  • Options
    DevilsbaneDevilsbane Member Posts: 4,214 ■■■■■■■■□□
    Pash wrote: »
    I prefer it x10 more than vbscript and this comes from someone who was learning VB and turbo pascal to write silly little apps in college (which was almost 10 years ago!).
    ...

    If you are still crazy and decide to go with vbscript you wan't your head looking at :D

    Pash

    Thanks for the advice. I also did some programming in turbo pascal. I actually liked it for writing simple programs, very easy to use. I did mine in highschool though, and it was only about 5 years ago.

    Is it possible to turn a powershell script into something like a batch file?
    Decide what to be and go be it.
  • Options
    PashPash Member Posts: 1,600 ■■■■■□□□□□
    Devilsbane wrote: »
    Thanks for the advice. I also did some programming in turbo pascal. I actually liked it for writing simple programs, very easy to use. I did mine in highschool though, and it was only about 5 years ago.

    Is it possible to turn a powershell script into something like a batch file?

    Why do you specifically need to turn something into a batch file?

    If you can give examples of where your concerns are maybe we can help.
    DevOps Engineer and Security Champion. https://blog.pash.by - I am trying to find my writing style, so please bear with me.
  • Options
    phoeneousphoeneous Member Posts: 2,333 ■■■■■■■□□□
    Pash wrote: »
    Why do you specifically need to turn something into a batch file?

    If you can give examples of where your concerns are maybe we can help.

    Login scripts for gpo's?
  • Options
    DevilsbaneDevilsbane Member Posts: 4,214 ■■■■■■■■□□
    phoeneous wrote: »
    Login scripts for gpo's?

    Very good example. Double clicking a file, or sticking it in the startup folder is easy. That was actually one of the things that I really liked about turbo pascal. It created a .exe file. The next language I worked in was java. And while java can certainly do more stuff, it was such a pain to export it as a .jre, and then the computer that was running it had to have java installed. I never have to worry about who I send a batch file to, it just works.
    Decide what to be and go be it.
  • Options
    PashPash Member Posts: 1,600 ■■■■■□□□□□
    phoeneous wrote: »
    Login scripts for gpo's?

    In 2008 R2 you have a whole tab dedicated to adding powershell scripts using GPO deployment.

    Admit-idly you can't do this in 2003, but that said you can indeed use a batch command to start a script at startup/logoff etc
    DevOps Engineer and Security Champion. https://blog.pash.by - I am trying to find my writing style, so please bear with me.
  • Options
    PashPash Member Posts: 1,600 ■■■■■□□□□□
    Devilsbane wrote: »
    Very good example. Double clicking a file, or sticking it in the startup folder is easy. That was actually one of the things that I really liked about turbo pascal. It created a .exe file. The next language I worked in was java. And while java can certainly do more stuff, it was such a pain to export it as a .jre, and then the computer that was running it had to have java installed. I never have to worry about who I send a batch file to, it just works.

    Batch scripting will have its uses well into the next few years, my argument was more against using vbscript instead of powershell. It's not certain that Microsoft will eventually bin cmd prompt and batch entirely but don't get left behind by not embracing powershell (that's my main point to you). I am still always fond of batch - Hell I had to use it lot's for several Altiris deployment scripts, also Ive always been a fan of Kixstart for it's simplicity and likeness to batch.

    It's so strange to hear that they are still using turbo pascal in teaching environment's :D. Feels like it was just yesterday i was writing a postal consignment program and saving data to floppy disk. I must have my old turbo pascal book somewhere!
    DevOps Engineer and Security Champion. https://blog.pash.by - I am trying to find my writing style, so please bear with me.
  • Options
    DevilsbaneDevilsbane Member Posts: 4,214 ■■■■■■■■□□
    Pash wrote: »
    It's so strange to hear that they are still using turbo pascal in teaching environment's :D. Feels like it was just yesterday i was writing a postal consignment program and saving data to floppy disk. I must have my old turbo pascal book somewhere!

    It might be gone now. Where I went to highschool there were 3 computer programming classes. The first class (which actually took up 2 semesters) was using turbo pascal. The second (also 2 semesters) was java, and the 3rd (only 1 semester) was special projects, in which you could pick whichever language you wanted, and sort of teach yourself along with the instructors assistance when you needed it. (People usually picked to continue java or to try c++)

    So I took the 1st class my sophomore year of highschool, and when I came back my Junior year to take the 2nd class I actually got placed into the same class. He was teaching them java, while I kind of worked on it by myself. From time to time I would pay attention to learn the exact syntax, but while he was teaching what an if/then statement is or what a loop does, I was free to just work on my own.

    For the special projects class, I also got tossed into the java class (not a lot of people taking computer programming at my highschool) and this time I was nearly completely left alone, because again, I chose to use java with dreams of being an awesome computer programmer and making a runescape type game. As it turns out, I decided that I didn't like programming so much. Once you started throwing in gui interfaces it just became too complicated and boring. Well, with the teacher compeltely off my back, and being a highschool senior, I completely sluffed off and listened to music and played games on my sega genesis emulator.

    Now here I am, several years out of highschool, I have found the usefulness of writing scripts to ease my workload. I self-taught myself many batch techniques by browsing the internet, however that left me wanting more. I started having to adopt vbscript files to fill in where .bat can't go, and decided that I should learn how to actually write them, rather than borrow something and make many attempts at modifying it to make it do what I wanted.
    Decide what to be and go be it.
  • Options
    DevilsbaneDevilsbane Member Posts: 4,214 ■■■■■■■■□□
    By the way, is privateer-online.com for the privateer game series that ran on dos?
    Decide what to be and go be it.
  • Options
    tierstentiersten Member Posts: 4,505
    Pash wrote: »
    It's not certain that Microsoft will eventually bin cmd prompt and batch entirely
    Microsoft won't ever get rid of the old command prompt for regular Windows. There is just too much of an installed base of scripts and procedures to even consider that as an option.
  • Options
    phoeneousphoeneous Member Posts: 2,333 ■■■■■■■□□□
    From what I have seen, you can do a task in powershell with just a few lines of code that would take about 25-50 lines of code in vbscript. I guess that makes it more simplistic?
  • Options
    PashPash Member Posts: 1,600 ■■■■■□□□□□
    Devilsbane wrote: »
    By the way, is privateer-online.com for the privateer game series that ran on dos?

    Yes inspiration behind the name of the domain is taken from that very Privateer.
    tiersten wrote: »
    Microsoft won't ever get rid of the old command prompt for regular Windows. There is just too much of an installed base of scripts and procedures to even consider that as an option.

    Never say never chum.
    DevOps Engineer and Security Champion. https://blog.pash.by - I am trying to find my writing style, so please bear with me.
  • Options
    DevilsbaneDevilsbane Member Posts: 4,214 ■■■■■■■■□□
    Pash wrote: »
    Yes inspiration behind the name of the domain is taken from that very Privateer.

    Very good game. I bought Privateer 2 at a garage sale many years back. It was one of my favorite games. I recently tried to run it on my windows 7 inside of a dos vm with no luck. Had some problems getting it going, but it also turns out that I'm missing one of the disks.
    Decide what to be and go be it.
  • Options
    PashPash Member Posts: 1,600 ■■■■■□□□□□
    Devilsbane wrote: »
    Very good game. I bought Privateer 2 at a garage sale many years back. It was one of my favorite games. I recently tried to run it on my windows 7 inside of a dos vm with no luck. Had some problems getting it going, but it also turns out that I'm missing one of the disks.

    It's one of my favourite games also. A younger clive owen of course stared in the game. The last I heard EA took over the rights to make Privateer Online (kind of like freelancer Im guessing).

    Pash
    DevOps Engineer and Security Champion. https://blog.pash.by - I am trying to find my writing style, so please bear with me.
  • Options
    DevilsbaneDevilsbane Member Posts: 4,214 ■■■■■■■■□□
    I know that "production" was started on a 3rd back in the day, but never made it anywhere. I also heard the EA picked it up, but I never heard them do anything with it. I wonder if they are actively working on it or just wanted the rights so they could do it if they wanted to.

    Anyways, since powershell is so much better, any recommendations on where I should start with that?
    Decide what to be and go be it.
  • Options
    PashPash Member Posts: 1,600 ■■■■■□□□□□
    Devilsbane wrote: »
    I know that "production" was started on a 3rd back in the day, but never made it anywhere. I also heard the EA picked it up, but I never heard them do anything with it. I wonder if they are actively working on it or just wanted the rights so they could do it if they wanted to.

    Anyways, since powershell is so much better, any recommendations on where I should start with that?

    Yeah EA though aren't the most overwhelmingly popular gaming dev/publisher though. They are franchise company, don't get me wrong they have backed some true jewels but I wouldn't feel comfortable with them picking this one up.

    Yeh sure:-

    1. Download PowerGui.
    2. Pick up a good book (back tracking through old posts on techexams will give you good recommendations).
    3. Visit Scripting Guy website frequently or make sure you have RSS feed setup.
    4. Practice lot's, from the shell, from script editing, keep practising.

    Pash
    DevOps Engineer and Security Champion. https://blog.pash.by - I am trying to find my writing style, so please bear with me.
Sign In or Register to comment.