Wasn't sure which thread to post this on, but haven't gotten any help from "Servers"...

I'm writing login scripts for the different departments in our company as they all use different Printers, Network Drives, etc.

I've managed to get the code together to do everything I need except set the Wallpaper to the Dept Wallpaper (loaded on one of the network drives as s:\[Dept]\Images\Wallpaper.bmp).

Is there any way to do this? I've searched a few forums but haven't found anything that works.

PS We do not currently separate users into different security groups based on Dept, though this is a project slated for near future, so one script for all users will not work yet.

Recommended Answers

All 2 Replies

Not those specifically, but they seem to give me the same code that I've already found... I've posted what code I have so far, the first part is network drives and printers, I know these work... however line 16 char 9 is where it is saying an error exists.... am I mixing code or something?

Set objNetwork = CreateObject("WScript.Network")
	objNetwork.MapNetworkDrive "S:" , "\\POLARIS\Share"

	Set objNetwork = CreateObject("WScript.Network")
	objNetwork.AddWindowsPrinterConnection "\\POLARIS\PrintStation1"

	Set objPrinter = CreateObject("WScript.Network")
	objPrinter.SetDefaultPrinter "\\polaris\printstation1"

	Set objNetwork = CreateObject("WScript.Network")
	objNetwork.AddWindowsPrinterConnection "\\POLARIS\Blue"

	Set objNetwork = CreateObject("WScript.Network")
	objNetwork.AddWindowsPrinterConnection "\\POLARIS\Penny Laserjet"

Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByVal lpvParam As Any, ByVal fuWinIni As Long) As Long 
Public Const SPI_SETDESKWALLPAPER = 20

 
Dim lngSuccess As Long
Dim strBitmapImage As String

strBitmapImage = s:\IT\images\AdminWallpaper.bmp
lngSuccess = SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, strBitmapImage, 0)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.