irsprint84 Posted October 3, 2015 Posted October 3, 2015 (edited) I found BGInfo/ 4x very buggy and a resource hog so I have recreated this in Powershell 4.0, you can make a advanced installer of this package and you need to put the files in c:\build then add the shortcut into "all users startup". I have tested this in Windows 7 - Windows 10 and screen size 800 x 600 to 1920 x 1080. I'm open to improvements or if anyone need to ask any questions and all I ask is if you keep my name in the scriptDesktop Refresh 1.0.zip Edited October 3, 2015 by irsprint84 1
irsprint84 Posted October 7, 2015 Author Posted October 7, 2015 Seen a few people downloaded it, anyone actually tried it?
Gatt Posted October 8, 2015 Posted October 8, 2015 I'm getting load of errors when I run it H:\>C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "C:\build\desktop.ps1" new-object : Exception calling ".ctor" with "2" argument(s): "Parameter is not valid." At C:\build\desktop.ps1:41 char:8 + $bmp = new-object System.Drawing.Bitmap ([int]($ScreenRev.screenwidth)),([int]($ ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [New-Object], MethodInvocationException + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand Exception calling "FromImage" with "1" argument(s): "Value cannot be null. Parameter name: image" At C:\build\desktop.ps1:42 char:1 + $bmpimg = [system.Drawing.Graphics]::FromImage($bmp) #enable graphic manipulatio ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: ( [], MethodInvocationException + FullyQualifiedErrorId : ArgumentNullException The property 'SmoothingMode' cannot be found on this object. Verify that the property exists and can be set. At C:\build\desktop.ps1:43 char:1 + $bmpimg.SmoothingMode = "AntiAlias" #set antialiased on temp bmp + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : PropertyNotFound You cannot call a method on a null-valued expression. At C:\build\desktop.ps1:49 char:1 + $bmpimg.DrawImage($img,$rect,0,0,$img.Width,$img.Height,$bmpunit) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\build\desktop.ps1:52 char:1 + $bmpimg.DrawString($HostNameText,$fontbold,$mybrush,$ScreenRev.screenwidth-$host ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\build\desktop.ps1:53 char:1 + $bmpimg.DrawString($HostName,$font,$mybrush,$ScreenRev.screenwidth-$hostnametext ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\build\desktop.ps1:55 char:1 + $bmpimg.DrawString($HostIPAddressText,$fontbold,$mybrush,$ScreenRev.screenwidth- ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\build\desktop.ps1:56 char:1 + $bmpimg.DrawString($HostIP,$font,$mybrush,$ScreenRev.screenwidth-$hostnametext.l ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\build\desktop.ps1:58 char:1 + $bmpimg.DrawString($HostMacAddressText,$fontbold,$mybrush,$ScreenRev.screenwidth ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\build\desktop.ps1:59 char:1 + $bmpimg.DrawString($HostMacAddress,$font,$mybrush,$ScreenRev.screenwidth-$hostna ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\build\desktop.ps1:61 char:1 + $bmpimg.DrawString($ImageVersionText,$fontbold,$mybrush,$ScreenRev.screenwidth-$ ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\build\desktop.ps1:62 char:1 + $bmpimg.DrawString($ImageVersion,$font,$mybrush,$ScreenRev.screenwidth-$hostname ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\build\desktop.ps1:64 char:1 + $bmpimg.DrawString($ServiceNumberText,$fontbold,$mybrush,$ScreenRev.screenwidth- ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\build\desktop.ps1:65 char:1 + $bmpimg.DrawString($ServiceNumber,$font,$mybrush,$ScreenRev.screenwidth-$hostnam ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\build\desktop.ps1:70 char:1 + $bmpimg.DrawString($HostNameText,$fontbold,$mybrush,$ScreenRev.screenwidth-$host ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\build\desktop.ps1:71 char:1 + $bmpimg.DrawString($HostName,$font,$mybrush,$ScreenRev.screenwidth-$hostnametext ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\build\desktop.ps1:74 char:1 + $bmpimg.DrawString($HostIPAddressText,$fontbold,$mybrush,$ScreenRev.screenwidth- ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\build\desktop.ps1:75 char:1 + $bmpimg.DrawString($HostIP,$font,$mybrush,$ScreenRev.screenwidth-$hostnametext.l ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\build\desktop.ps1:78 char:1 + $bmpimg.DrawString($HostMacAddressText,$fontbold,$mybrush,$ScreenRev.screenwidth ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\build\desktop.ps1:79 char:1 + $bmpimg.DrawString($HostMacAddress,$font,$mybrush,$ScreenRev.screenwidth-$hostna ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\build\desktop.ps1:82 char:1 + $bmpimg.DrawString($ImageVersionText,$fontbold,$mybrush,$ScreenRev.screenwidth-$ ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\build\desktop.ps1:83 char:1 + $bmpimg.DrawString($ImageVersion,$font,$mybrush,$ScreenRev.screenwidth-$hostname ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\build\desktop.ps1:86 char:1 + $bmpimg.DrawString($ServiceNumberText,$fontbold,$mybrush,$ScreenRev.screenwidth- ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\build\desktop.ps1:87 char:1 + $bmpimg.DrawString($ServiceNumber,$font,$mybrush,$ScreenRev.screenwidth-$hostnam ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\build\desktop.ps1:89 char:1 + $bmp.save($destination,[system.Drawing.Imaging.ImageFormat]::Jpeg) #convert bmp ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull You cannot call a method on a null-valued expression. At C:\build\desktop.ps1:90 char:1 + $bmp.Dispose() #dispose of bmp manipulation + ~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [], RuntimeException + FullyQualifiedErrorId : InvokeMethodOnNull It also just sets the "temp" background
irsprint84 Posted October 8, 2015 Author Posted October 8, 2015 Ah I think I know, because downloaded from internet have you "unblocked" the files?
ITGuyNW Posted October 9, 2015 Posted October 9, 2015 This just outputs the image with the embedded BGinfo.. so far I'm not seeing any of my machine information being put on the desktop. Also I had to run proxy settings for the file to run. Once the image is displayed on the background, the edges are being cut off, so I can't get full bginfo information anyway.
irsprint84 Posted October 10, 2015 Author Posted October 10, 2015 Have you right clicked and unblocked all the files?
Gatt Posted October 10, 2015 Posted October 10, 2015 Have you right clicked and unblocked all the files? Yep.. Did that when I initially downloaded it.
irsprint84 Posted October 10, 2015 Author Posted October 10, 2015 Just incase I uploaded the wrong files, this attachment 100% in my business and at home, may need Powershell 4.0 as well as can't remember if works on 3 Desktop Ref.zip
dastrix Posted August 4, 2016 Posted August 4, 2016 I have unblocked the files and also only getting the original file as a background, how should i deploy it through GPO?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now