VB Code Help

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

driver_uk2001

Thread Starter
Joined
Mar 30, 2002
Messages
526
Hi i am trying to create a VB logon script so that on connect if the users are in the certain groups it will connect to the specified folders and also i am trying to add printers to each user automatically. can anyone tell me what is wrong with this code please?

If InGroup("Year 00")
USE S: \\rossmeresrv\joint\00
EndIf
If InGroup("Year 01")
USE S: \\rossmeresrv\joint\01
EndIf
If InGroup("Year 02")
USE S: \\rossmeresrv\joint\02
EndIf
If InGroup("Year 03")
USE S: \\rossmeresrv\joint\03
EndIf
If InGroup("Year 96")
USE S: \\rossmeresrv\joint\96
EndIf
If InGroup("Year 97")
USE S: \\rossmeresrv\joint\97
EndIf
If InGroup("Year 98")
USE S: \\rossmeresrv\joint\98
EndIf
If InGroup("Year 99")
USE S: \\rossmeresrv\joint\99
EndIf

addPrinterConnection (\\sx3200247\Printers\HP 1315-Colour)
addPrinterConnection (\\rossmeresrv\T612)
SetDefaultPrinter(\\rossmeresrv\T612)
addPrinterConnection (wirelessdt04\Mini.Suite.Main)

Thanx

Mick
 
Joined
Oct 12, 2003
Messages
3,015
You need to shell out to the NET command for the "USE \\resource\path" command.

Shell( "net.exe", "use \\resource\path", vbNormalFocus )
 

driver_uk2001

Thread Starter
Joined
Mar 30, 2002
Messages
526
Hi sorry i wasnt specific in my first post. The problem i have is that the printers are not auto adding to users when they log on. How can i solve this?

Thanx
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top