Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Other Programming > VBScript
|
VBScript For questions and discussions related to VBScript.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VBScript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old May 15th, 2009, 06:20 AM
Registered User
 
Join Date: Jan 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Assigning Logon Scripts via VBS

Peace all,

Is there any way to assign a logon script using vbs (instead of via the Profile tab or GPO)?

Let's say I already have a script that looks something like this:
Code:
Set WSHPrinters = WSHNetwork.EnumPrinterConnections
For LOOP_COUNTER = 0 To WSHPrinters.Count - 1 Step 2
'Find local printers
    If Left(WSHPrinters.Item(LOOP_COUNTER +1),2) <> "\\" Then
      WSHNetwork.SetDefaultPrinter _              
              (WSHPrinters.Item(LOOP_COUNTER +1))
    End If
Next
If setting up manually (using Profile tab or GPO), it works fine.
I just want to know whether vbs can also be used to assign logon script to a specific user account.

Thanks,
=adley=
Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
.ASP and .VBS misskaos99 Classic ASP Basics 2 January 3rd, 2008 11:36 AM
Question on .vbs file savoym VBScript 2 February 24th, 2005 12:12 PM
VBS and FTP red4vbs VBScript 0 January 15th, 2005 12:59 PM
urgent--vbs samred Classic ASP Basics 1 January 5th, 2005 03:31 AM
HELP with .VBS file savoym VBScript 1 July 31st, 2003 08:39 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.