The Fate of Tyrlon and other Dubious Things

A chronicle about life, software development, games and whatever else I come up with!

The Fate of Tyrlon and other Dubious Things header image 2

Remote Scripting

July 29th, 2008 · No Comments

Perhaps i’m the only one who runs into this kind of thing on a weekly basis, but I have to write VB Scripts for my job to be able to do fancier things with our systems management appliance.  One of the things that I was messing around with this week was cobbling together a script to add IP printers automagically to any machine I want.

The script itself works fabulous and I just provide an IP address, the name of the printer, and the location of the drivers (in this ntprint.inf which is where all built-in Windows drivers locations are stored at!).  Once I do that the script goes through and adds the TCP/IP port to my ports list, configures the printer and names it (sets it to default optionally) and then cycles the print spooler off and back on so that it will show up in the list of printers.

The problem is that the systems management appliance runs its scripts as the Local System account and this doesn’t always mean that it has the proper credentials to actually run scripts that I can run locally.  I tried experimenting with scripting a runas command to elevate the permissions level, but the problem seems to be that you can’t runas a cscript command (to start another VB Script) from a vbscript.  I don’t think cscript likes nesting itself too much so i’m still struggling to figure out a way to do it.  If anyone can enlighten me i’d love any suggestions!

Share and Enjoy!
  • StumbleUpon
  • Digg
  • del.icio.us
  • Technorati
  • Fark
  • Slashdot
  • Facebook

If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags: Software Development · Work

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment