Solved

BGInfo Alternative

Posted on 2014-09-10
30
5,512 Views
Last Modified: 2014-09-25
HI Experts,

We use BGInfo in our environment currently and it causes mutliple issues with users wallpapers either overstretching them or doubling them up or even the BGInfo writing itself doubling up on itself.

I now would like an alterative admins use in their environments to gather the users Hostnames and IP addresses.

Licensed or free would be fine in our case.
0
Comment
Question by:Rizzle
  • 13
  • 10
  • 4
  • +2
30 Comments
 
LVL 3

Expert Comment

by:TropicalBound
Comment Utility
0
 
LVL 78

Expert Comment

by:David Johnson, CD, MVP
Comment Utility
use a logon script that captures the information then the admin need only access the log file.
0
 
LVL 82

Expert Comment

by:oBdA
Comment Utility
You're using RDP to connect to those machines? The problem is that in RDP sessions, you get session specific temporary folders, and the default location for the Bginfo generated bitmap is the temp folder.
There's a rather easy fix for this: open the bgi file you're using, go to the Bitmap menu, and change the bitmap location to "User's application data directory". Save the bgi file, reset the wallpaper to your initial plain background, then try again.
0
 
LVL 6

Expert Comment

by:Steve Whitcher
Comment Utility
I know you didn't ask for help with BGinfo, but if you're interested in trying to get it working properly instead of switching it out, we use it on all of our workstations and I might be able to offer suggestions.

It sounds like your issues might be related to changes in screen resolution from one user to another, or from the resolution BGinfo generates wallpaper at to the resolution the user has set.  How / when are you running BGinfo?

I have our startup script set to check for a local copy of the bginfo files on the machine and create them if they don't exist, but put a shortcut to bginfo in the All Users Startup directory, so that BGInfo doesn't actually run until after a user logs on.  Then, in the config file for bginfo, I have it set to use a specific bmp file for the background, and stretch it to fit the screen resolution.  That way the wallpaper is actually created and set for full screen based on the resolution of that user's session.  It should even address the possibility of RDP connections running at different resolutions, if that is an issue for you.
0
 
LVL 13

Author Comment

by:Rizzle
Comment Utility
Hi Guys,

Thank you all for your prompt responses on the post. We are'nt RDP'ing anywhere, BGInfo is being ran by a GPO Script which is user side and then loopback processing is enabled to run it at the computer side, this is done due to us having a Thin Client environment and therefore they logon to Citrix servers which BGInfo is not required.

Another issue we have is the BGInfo over writes its current info and then overlays that on top of the current info.

Are your clients Windows 7/Windows8 as well?

Screenshot of the issues attached.
bginfo.jpg
bginfo2.jpg
0
 
LVL 6

Assisted Solution

by:Steve Whitcher
Steve Whitcher earned 500 total points
Comment Utility
The first screenshot looks like it's an issue with the wallpaper not being sized/streched to fit the resolution, it's being tiled instead.  In the second screenshot, it looks like BGinfo grabs the users existing wallpaper, which already has bginfo added to it, and uses that as the background.  I assume your BGinfo config is set to use the user's existing wallpaper settings, rather than specifying what settings to use.   I'm surprised BGinfo would get itself into a loop like that.  The way you describe the GPO, I'm wondering if you have the script actually triggering twice, and that's where the loop is coming from?

In my case, since we have a standard wallpaper we want on all desktops, I have the bginfo config file set to use a specific bmp file for the background.  The file is stored on a network share that everyone has access to, so if we ever want to change the wallpaper, we just replace the bmp on the network share and bginfo will get the new file next time someoen logs in.  Along with that, when you specify the background settings, you can also specify whether it gets stretched, tiled, or centered.  
If you don't want to force a specific wallpaper on users, you may have to do things a little differently.  Perhaps you could set BGinfo to use "%userprofile%\wallpaper.bmp" as the background image, and then any user who wants a custom image could save the desired background image in their profile folder.

We use Windows 7 for our standard workstation image, but have a handful of workstations running Windows 8 as well.
0
 
LVL 82

Expert Comment

by:oBdA
Comment Utility
The second picture looks exactly like the issue with the temporary files as bginfo bitmap location I described above.
0
 
LVL 6

Accepted Solution

by:
Steve Whitcher earned 500 total points
Comment Utility
I assign a startup script rather than a logon script.  That works well, since startup scripts apply to the computer, not the user.  As you can see below, the startup script doesn't run BGinfo, it just checks for and creates the required files.  By putting a shortcut in the Startup directory for All Users, bginfo only creates and applies the wallpaper when the user logs on.

Here are the relevant files and bits of script that I use:  

\\domain.com\netlogon\Startup.cmd
if not exist "c:\bginfo\bginfo1.bgi" xcopy /y /i "\\domain.com\netlogon\bginfo" "C:\bginfo"
if not exist "%AllUSERSPROFILE%\microsoft\windows\start menu\startup\bginfo.lnk" copy /y "c:\bginfo\bginfo.lnk" "%AllUSERSPROFILE%\microsoft\windows\start menu\programs\startup\bginfo.lnk"

Open in new window


\\domain.com\netlogon\bginfo\bginfo.bat
@echo off 
c:\bginfo\bginfo.exe c:\bginfo\bginfo1.bgi /nolicprompt /timer:0

Open in new window


\\domain.com\netlogon\bginfo\bginfo.lnk
(Shortcut pointing to c:\bginfo\bginfo.bat)

\\domain.com\netlogon\bginfo\bginfo.exe

\\domain.com\netlogon\bginfo\bginfo1.bgi
bginfo-main.PNGbginfo-background.PNG
0
 
LVL 13

Author Comment

by:Rizzle
Comment Utility
Hi Steve,

Thanks for this its very much appreciated!!

I've done as you said

This is what our start.cmd looks likes:
if not exist "c:\bginfo\config.bgi" xcopy /y /i "\\orbit.org.uk\netlogon\BGInfo" "C:\bginfo"
if not exist "%AllUSERSPROFILE%\microsoft\windows\start menu\startup\bginfo.lnk" copy /y "c:\bginfo\bginfo.lnk" "%AllUSERSPROFILE%\microsoft\windows\start menu\programs\startup\bginfo.lnk"

This is what the BGInfo.bat looks like:
@echo off
c:\bginfo\bginfo.exe c:\bginfo\config.bgi /nolicprompt /timer:0

in the BGInfo folder in Sysvol we have: BGInfo.bat, BGInfo.exe, BGinfo.lnk, Config.bgi and startup.cmd
(all configured to the way you said)

now this has gone into a GPO (Screenshot attached)

But when applied to a test OU with a computer in, its almost like the startup.cmd isnt running? or copying the .lnk anywhere?

Also the other 2 steps you specified with the pictures, users within the business do use their own wallpapers, however we could enforce a company one if required, could we just use copy the users wallpaper settings?
0
 
LVL 13

Author Comment

by:Rizzle
Comment Utility
GPO attached.
GPO.JPG
0
 
LVL 13

Author Comment

by:Rizzle
Comment Utility
Here is what the shortcut is running aswell.
BGINfo27.JPG
0
 
LVL 6

Assisted Solution

by:Steve Whitcher
Steve Whitcher earned 500 total points
Comment Utility
The first thing I see wrong is that the bginfo.bat shouldn't be run as a startup script.  The GPO only needs to run startup.cmd

Startup.cmd doesn't need to be in the bginfo folder, as there is no reason to copy startup.cmd down to the local drive. It just handles copying the other files for bginfo and creates the shortcut to trigger bginfo at every logon. In our environment, the script path in the GPO is \\domain.com\netlogon\startup.cmd


Is the bginfo folder getting copied down to the local drive?  Have you confirmed that the GPO has been seen and applied by the workstation?  Tested the path to the script?  (Startup scripts run under the local system account, so make sure the files are accessible under that context.) And the obvious question, have you restarted the workstation at least once since it got the new policy?

Regarding pulling the existing wallpaper settings, you would have to test it and see. I think it should work, now that the bginfo app is only running once, but I am not at my desk today and can't test it out.  My suggestion of users saving their preferred image in their profile as wallpaper.bmp would be a workaround if you do still find bginfo writing info over itself.
0
 
LVL 13

Author Comment

by:Rizzle
Comment Utility
Hi Steve,

I've made the amendment to the GPO itself so now only the startup.cmd is running at startup and also this is in the Netlogon folder rather than the BGInfo one. Also i've rebooted the client multiple times and nothing seems to be happening in regards to the folder being copied down the local machine. I've ran an RSOP and the machine is receiving the script on startup but its almost not running it? I've amended the GPO Script path to %logonserver%\Netlogon\startup.cmd and it still doesnt seem to be running it at startup?

But if i then open a command window and then drag the Startup.cmd file into the folder copys but then a message for the .lnk files comes up saying

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\admin>\\Gardmn01\netlogon\startup.cmd

C:\Users\admin>if not exist "c:\bginfo\config.bgi" xcopy /y /i "\\orbit.org.uk\netlogon\BGInfo" "C:\BGInfo"

C:\Users\admin>if not exist "C:\ProgramData\microsoft\windows\start menu\startup\bginfo.lnk" copy /y "c:\bginfo\bginfo.lnk" "C:\ProgramData\microsoft\windows\start menu\programs\startup\bginf
o.lnk"
The system cannot find the file specified.

C:\Users\admin>
0
 
LVL 6

Expert Comment

by:Steve Whitcher
Comment Utility
Did the bginfo folder get copied to the c drive when you manuallY ran the script?

If not, try copying each line of the script one at a time and pasting into a command prompt. Do you get an error for the file copy lines?
0
 
LVL 13

Author Comment

by:Rizzle
Comment Utility
I can confirm the BGInfo folder is now being copied down via the GPO (Startup.cmd)

But the issue seems to be with the 2nd part of the startup.cmd which is the .lnk , it almost isnt copying the .lnk into a startup folder? does my .lnk file look ok Steve? is the 2nd part of the startup.cmd definitely right?

C:\Users\admin>if not exist "C:\ProgramData\microsoft\windows\start menu\startup\bginfo.lnk" copy /y "c:\bginfo\bginfo.lnk" "C:\ProgramData\microsoft\windows\start menu\programs\startup\bginf
 o.lnk"
BGINfo27.JPG
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 13

Author Comment

by:Rizzle
Comment Utility
Could you possible provide me your .lnk file Steve?

My one definitely seems to be wrong as now when you right click it, it comes up with a weird "Target" and also "Start in"
0
 
LVL 78

Expert Comment

by:David Johnson, CD, MVP
Comment Utility
the start in and link are correct once copied to the destination computer
0
 
LVL 6

Assisted Solution

by:Steve Whitcher
Steve Whitcher earned 500 total points
Comment Utility
The .lnk file looks right based on the screenshot you posted.  I do see an error in the copy command for it, but it looks like that was in the original command text that I gave you, sorry.  The first path is missing "\programs" between start menu and \startup.   Still, that shouldn't keep it from working, it would just make it copy the lnk every time, even if it already existed.

Here is the corrected version of that line:
if not exist "%AllUSERSPROFILE%\microsoft\windows\start menu\programs\startup\bginfo.lnk" copy /y "c:\bginfo\bginfo.lnk" "%AllUSERSPROFILE%\microsoft\windows\start menu\programs\startup\bginfo.lnk"

Open in new window



Just to confirm, the BGinfo directory is now getting copied to the local drive on the workstation, correct?  On the workstation, the directory c:\bginfo\ should contain:
bginfo.bat
bginfo.exe
bginfo.lnk
config.bgi

Check your start menu, under All Programs\Startup - is bginfo.lnk listed there?  If not, try pasting the corrected command above into a cmd prompt.  Do you get an error?

If there seems to be a problem with your LNK file, I'd try creating a new one.  Do it on a computer that has the c:\bginfo directory just to make it easy.  The Target should be "C:\bginfo\bginfo.bat" and Start In "C:\bginfo".  Make sure the shortcut is saved as bginfo.lnk, and copy it over the old ones in both the c:\bginfo and the \\domain.com\netlogon\bginfo directories
0
 
LVL 6

Expert Comment

by:Steve Whitcher
Comment Utility
If you're still having trouble with the copied shortcut, you could try using a hardlink instead.  Replace the "if exist... " line for the lnk file with:

mklink /h "%allusersprofile%\microsoft\windows\start menu\programs\startup\bginfo.bat" "C:\bginfo\bginfo.bat"

Open in new window

0
 
LVL 13

Author Comment

by:Rizzle
Comment Utility
Hi Steve/David,

I've now amended the Startup.cmd to the line you gave me Steve and when I run the startup.cmd on a comand prompt I get the below:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\admin>\\%logonserver%\NETLOGON\startup.cmd

C:\Users\admin>if not exist "c:\bginfo\config.bgi" xcopy /y /i "\\orbit
.org.uk\netlogon\BGInfo" "C:\BGInfo"

C:\Users\admin>if not exist "C:\ProgramData\microsoft\windows\start men
u\programs\startup\bginfo.lnk" copy /y "c:\bginfo\bginfo.lnk" "C:\ProgramData\mi
crosoft\windows\start menu\programs\startup\bginfo.lnk"
The system cannot find the file specified.

C:\Users\admin>

Steve that is correct I get those 4 files copied to the client. I've now created the .lnk on a client which has the BGInfo folder already on the C drive.

Anyway I made the new shortcut on the client then copied it to my BGInfo folder in Netlogon, deleted the BGinfo folder locally on the client and then restarted and got the same result...

Here is a screenshot of the .lnk now...
BGInfoDebug1.PNG
0
 
LVL 13

Author Comment

by:Rizzle
Comment Utility
Hi Steve,

I've replaced the line for the .lnk with the line you gave me,

When ran in the command prompt on the client it states the 2nd line is "Access is denied"

But when checking the startup folder now the BGInfo.bat file is appearing there.
0
 
LVL 13

Author Comment

by:Rizzle
Comment Utility
Steve,

It seems to be running the BGInfo.bat okay on the client now!! I will delete the .lnk from the BGInfo folder in Netlogon.

Hopefully the issue with the wallpaper doubling up and the BGInfo writing doubling up should be sorted now!

If not we will look to deploy a custom wallpaper to desktops and laptops in the environment and then use the BGInfo bmp feature to set this as default at logon so the BGInfo writing looks ok!
0
 
LVL 6

Expert Comment

by:Steve Whitcher
Comment Utility
The mklink command needs to be run from an administrative command prompt if you're running it manually, not just a regular cmd.  If you use it in the startup.cmd script though, replacing the command to copy the lnk file, it should work properly since that script is run under the local system account rather than a user account.  

Glad to hear it's working for you.  I'd definitely reboot and log on/off a couple of times to test it and make sure that it is behaving as expected, but I think you'll be good.
0
 
LVL 78

Expert Comment

by:David Johnson, CD, MVP
Comment Utility
I don't know why you ran around the block when a simple one line startup script would have done it for you.
startup.cmd (in sysvol)
\\server\share\bginfo.exe \\server\share\bginfo1.bgi /nolicprompt /timer:0
0
 
LVL 13

Author Comment

by:Rizzle
Comment Utility
David,

If so simple why didn't you comment that before? just curious.

Appreciate the help as well Steve, I will test it and come back to you.
0
 
LVL 6

Expert Comment

by:Steve Whitcher
Comment Utility
David - While that one line startup script would trigger bginfo when it runs, it wouldn't accomplish the goals that we had for it.  
I need the wallpaper to update every time a user logs on, but not only when the computer boots as your startup script would do.  
A large percentage of our workstations are mobile devices, which may not be network connected when they boot or when a user logs in.  By copying the files required for bginfo to the local drive first, it will still update the wallpaper even if a network connection is not available.  
Another advantage of having the files on the local drive is that if our helpdesk needs the end user to manually update the wallpaper for some reason, it's easy to walk them through finding the batch file on the C drive and running it.  That isn't something we do often, but there are times when it's a quick easy way to get info from the user.
0
 
LVL 13

Author Comment

by:Rizzle
Comment Utility
Thanks for everything on this Steve.

Once fully tested and working i will let you know!
0
 
LVL 78

Expert Comment

by:David Johnson, CD, MVP
Comment Utility
logon scripts can run in either context the machine or the user.
0
 
LVL 6

Expert Comment

by:Steve Whitcher
Comment Utility
David - Correct, a Logon script would be able to run under the user account at the time of logon, but the startup script you suggested previously would not.  

Even so, directly executing bginfo from a network share as part of the logon script did not meet all of our requirements, particularly the bginfo for the wallpaper to update even when the computer is not connected to the network.  By copying the files to the local drive and executing from there, we were able to get the desired results.  - By putting the file copy in the startup script, rather than a one time push of the files out to each computer, we were able to ensure that new or re-imaged computers got the files, and if the files were ever deleted from a PC they would be replaced.  In addition, it made it easy to update the BGinfo Config file in the future if needed, by placing a new file on the share with a different filename (i.e. bginfo2.bgi ) and revising the filename that the startup script checks for.  That ensures that every computer will get the new config file the next time the reboot (while network connected.)

I'm sure a simple one line command in the logon script is suitable for some environments, it just didn't meet our needs.
0
 
LVL 13

Author Closing Comment

by:Rizzle
Comment Utility
Steve was brilliant in providing the solution required. I'm sure me and him will be in touch again!!
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
This Micro Tutorial will give you basic overview of the control panel section on Windows 7. It will depth in Network and Internet, Hardware and Sound, etc. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now