70470 Posts in 6879 Topics - by 687 Members - Latest Member: Laricwashere

Author Topic: VBScript Tutorials  (Read 1860 times)

Offline sully!

  • Administrator
  • Godlike Gamer
  • *
  • Posts: 4997
  • Karma: 16
  • If the future is now, where's my jetpack?
  • Steam ID: sully213
  • XBox Gamer Tag: FITESully
VBScript Tutorials
« on: May 21, 2006, 08:55:10 PM »
At work we recently locked down access to the command line for the "l'users" in the company and so now I'm left with a whole bunch of batch scripts that don't work anymore. I still have access to the command line, but I had quite a few scripts I wrote that ran under a normal user. With no access to the command-line, these scripts no longer work.

So now the only scripting method I have available to me is VBScript (has to use the WScript processor, can't use CScript) and I'm not as familiar with VBScript as I'd like to be. I've done a good bit of searching on this but can't really find something that fits what I'm looking for.

Does anyone know of any VBScript tutorials (emphasizing system/network administration vs. web use) that might get me along the path to knowledge I'm looking for?

It doesn't even really have to be a tutorial per se, even just a reference so that when I want to map a network drive, add a printer, or just echo back system information I can quickly refer to something to find the object/method I need to use to get what I'm after.

Thanks.
Please just walk away. I don't want to have to stand here and say something so awesome that I'll have to remember it the rest of the day. Thank you!

TekieB

  • Guest
VBScript Tutorials
« Reply #1 on: May 21, 2006, 09:01:23 PM »
does it give you that "command prompt has been disabled by the admin" message when you open it?

if so there is a very easy way to get past that

Offline _!Rathe!_

  • Master Sergeant Shooter Sergeant Person
  • Godlike Gamer
  • *
  • Posts: 2296
  • Karma: 0
  • XFire: rathewin2k
VBScript Tutorials
« Reply #2 on: May 22, 2006, 06:55:10 AM »
Can you use the RunAs command to run the script as as administrator??  All you would have to do is modify the shortcut to the batch file to get it to run.
Never, but never question the engineers judgement.

Offline sully!

  • Administrator
  • Godlike Gamer
  • *
  • Posts: 4997
  • Karma: 16
  • If the future is now, where's my jetpack?
  • Steam ID: sully213
  • XBox Gamer Tag: FITESully
VBScript Tutorials
« Reply #3 on: May 22, 2006, 08:11:12 AM »
Quote from: "TekieB"
does it give you that "command prompt has been disabled by the admin" message when you open it?

if so there is a very easy way to get past that


Yes, the users get that message, and no, it isn't as easy as you think, plus I'm not willing to circumvent a corporate security policy and get my ass fired.

Rathe, using RunAs and running the scripts as an administrator is not an option as they are going to be run as a regular user. If it's a script that I use to automate a few tasks, it doesn't matter because I still have access to the command prompt.

To give you an axample of what some of the scripts do (they are very simple), one I want to translate is called Where Am I? and it echos back to the user things like their username, their PC Name, the domain they are logged on to, which domain controller authenticated them, their version of Windows, uptime, IP Address and a couple of other little things if I remember correctly. It may not sound like much, but it's very useful.

Another script that was in the works before this all happened was really just  using xcopy to copy changed files from a network share to a tech's laptop so he has access to  these files while he's out on the road, replacing the current method of me burning 15-20 CD's every couple months and wasting my time.

Beyond all of these specific purposes, I just want to learn it. I'm pretty good with batch scripting, I just kind of need something to bridge that knowledge into VBScript. Let's face it, batch scripts are a dying breed. With Monad coming (aka Windows Power Shell), it will be even deader.
Please just walk away. I don't want to have to stand here and say something so awesome that I'll have to remember it the rest of the day. Thank you!

Offline The Shoctor

  • Administrator
  • Godlike Gamer
  • *
  • Posts: 5803
  • Karma: 17
  • Steam ID: shadohawk@shadoworks.net
  • XBox Gamer Tag: TheShoctor
  • XFire: shadoworks
VBScript Tutorials
« Reply #4 on: May 22, 2006, 08:59:01 AM »
http://www.winguides.com/scripting/

I am startting to poke around in there. What I like is they have a refrence guide... If I find anything good I will post again.

Support LAN Play!
ლ(ಠ益ಠლ) "I have more than 20 friends EA!" --FITES.NET
(╯°□°)╯︵ ┻━┻
"Close enough." --UGC League

Offline sully!

  • Administrator
  • Godlike Gamer
  • *
  • Posts: 4997
  • Karma: 16
  • If the future is now, where's my jetpack?
  • Steam ID: sully213
  • XBox Gamer Tag: FITESully
VBScript Tutorials
« Reply #5 on: May 22, 2006, 11:54:34 AM »
Spectacular!!! That is about 99% what I am looking for!

That one's going in the bookmarks :)

Thanks Shado!  :10:   :2thumbsup:  :clap:
Please just walk away. I don't want to have to stand here and say something so awesome that I'll have to remember it the rest of the day. Thank you!

Offline The Shoctor

  • Administrator
  • Godlike Gamer
  • *
  • Posts: 5803
  • Karma: 17
  • Steam ID: shadohawk@shadoworks.net
  • XBox Gamer Tag: TheShoctor
  • XFire: shadoworks
VBScript Tutorials
« Reply #6 on: May 22, 2006, 01:20:41 PM »
No problem! Glad it helped!

Support LAN Play!
ლ(ಠ益ಠლ) "I have more than 20 friends EA!" --FITES.NET
(╯°□°)╯︵ ┻━┻
"Close enough." --UGC League