Page 1 of 1 1
Topic Options
#208310 - 2014-01-13 11:16 PM BGInfo Win7 and Win8.1
CameronSeward Offline
Fresh Scripter

Registered: 2008-07-15
Posts: 13
Loc: Portland, Oregon
I have been combing through the posts here and I have found many examples to get BGinfo to work. Most of them have been dated early last year. I have tried the coding that has been provided and I cannot for the life of me get them to work. These are the two that I have tried. I do have drive mappings below this in the script and they work just fine. Thanks in advance for any help given.

[BGInfo]
 Code:
If Exist("%TEMP%\BGInfo.bmp")
   Del "%TEMP%\BGInfo.bmp"
Endif

Shell "\\DomainName\netlogon\bginfo\Bginfo.exe /timer:0 /silent /NOLICPROMPT \\DomainName\NetLogon\bginfo\custom.bgi"

and then I also tried using this one too.

[BGInfo]
 Code:
#$=SetOption("Explicit","ON")
#Dim $sLocalDir	$sLocalDir="C:\BGInfo"

#If Not Exist($sLocalDir) MD $sLocalDir EndIf
#If Not Exist($sLocalDir+"\bginfo.exe") COPY @LSERVER+"\NETLOGON\bginfo\bginfo.exe" $sLocalDir EndIf
#If Not Exist($sLocalDir+"\custom.bgi") COPY @LSERVER+"\NETLOGON\bginfo\custom.bgi" $sLocalDir EndIf

#Run $sLocalDir+"\Bginfo.exe "+$sLocalDir+"\custom.bgi /timer:0 /silent /NOLICPROMPT /LOG:"+%TEMP%+"\bginfo.log"


Edited by Mart (2014-01-14 02:14 PM)
Edit Reason: Please use code tags when posting code.

Top
#208312 - 2014-01-14 02:19 PM Re: BGInfo Win7 and Win8.1 [Re: CameronSeward]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
First question, why all the hashtags in ypour second example? They are not valid operators or anyhting in kix.

This works fine for me on Windows 7 and 2008 R2. I'm not on Windows 8.x yet.
 Code:
Run @LDRIVE + "bginfo.exe " + @LDRIVE + "yourbginfofile.bgi /Timer:0 /accepteula"
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#208315 - 2014-01-14 05:59 PM Re: BGInfo Win7 and Win8.1 [Re: Mart]
CameronSeward Offline
Fresh Scripter

Registered: 2008-07-15
Posts: 13
Loc: Portland, Oregon
Sorry about the hashtags - I copied directly from my kix file. my understanding is that putting them in would make them not work. So instead of deleting it I left it in and put the hashtags there for Kix to ignore it. I will try what you have put here to see if that will work and I will let you know.
Top
#208316 - 2014-01-14 06:06 PM Re: BGInfo Win7 and Win8.1 [Re: CameronSeward]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4403
Loc: New Jersey
"#" is not a valid Kix object. Use the semicolon (;) or block comments (/* ... */) to prevent code from being executed.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#208319 - 2014-01-14 07:02 PM Re: BGInfo Win7 and Win8.1 [Re: CameronSeward]
CameronSeward Offline
Fresh Scripter

Registered: 2008-07-15
Posts: 13
Loc: Portland, Oregon
Huh - frustrating. - I put in what you listed above with my custom.bgi file and it still would not run yet the drives map just fine.
Top
#208320 - 2014-01-14 07:08 PM Re: BGInfo Win7 and Win8.1 [Re: CameronSeward]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4403
Loc: New Jersey
Maybe you should post your complete script..
_________________________
Actually I am a Rocket Scientist! \:D

Top
#208322 - 2014-01-14 08:56 PM Re: BGInfo Win7 and Win8.1 [Re: Glenn Barnas]
CameronSeward Offline
Fresh Scripter

Registered: 2008-07-15
Posts: 13
Loc: Portland, Oregon
Here is my complete script.

[COMMON]
ClearPrinterMappings=n
ForceVisible=y
ClearDriveMappings=y
ClearShareConnections=y
MinimumDisplayTime=5
BEEP=N

[BGINFO]

Run @LDRIVE + "bginfo.exe " + @LDRIVE + "custom.bgi /Timer:0 /accepteula"

[Personal]
CLASS=DISK
TARGET=P:
PATH=\\pmg2svr\%username%$
DESC=Personal Drive
PRIV=
GROUPS=
OUS=

[IT Department Drive]
CLASS=DISK
TARGET=T:
PATH=\\pmgsvr\itdept$
DESC=IT Folder
GROUPS=IT Department,
OUS=

[Falcon Drive]
CLASS=DISK
TARGET=z:
PATH=\\sql\actad
DESC=Falcon Drive
GROUPS=Falcon Users,
OUS=

[Everyone]
CLASS=DISK
TARGET=U:
PATH=\\pmgsvr\Everyone
DESC=For All to Access
GROUPS=
OUS=

[Budget]
CLASS=DISK
TARGET=V:
PATH=\\pmgsvr\PCC2014$
DESC=For PCC Budget
GROUPS=Budget PCC Group
OUS=

Top
#208323 - 2014-01-14 10:08 PM Re: BGInfo Win7 and Win8.1 [Re: CameronSeward]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4403
Loc: New Jersey
OK - you're using my Universal Login Script. This isn't the script but the config file. Hashtags are valid as comments, but have become deprecated. Semicolon is now preferred when commenting an INI file.

I'll review the config and post the correction shortly. You should be requesting support for this from the web site in my sig, as listed in the User Guide.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#208324 - 2014-01-14 10:29 PM Re: BGInfo Win7 and Win8.1 [Re: Glenn Barnas]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4403
Loc: New Jersey
Your BGINFO section is not complete or correct - it should look like this:
 Code:
[BGINFO]
; Define a COMMAND resource record
CLASS=COMMAND
; Define the path to the command to run
PATH=bginfo.exe
; Specify the arguments passed to the command
ARGS=custom.bgi /Timer:0 /accepteula
; Specify the execute method - RUN in a separate command instance
METHOD=RUN
I added the comments to help you understand what each parameter does. They are not required, but are helpful.

This is documented on Pages 16, and 20-21 of the current User Guide. If you don't have this document, download a copy from http://www.innotechcg.com/downloads/ULS_UserGuide.pdf
Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#208325 - 2014-01-14 11:14 PM Re: BGInfo Win7 and Win8.1 [Re: Glenn Barnas]
CameronSeward Offline
Fresh Scripter

Registered: 2008-07-15
Posts: 13
Loc: Portland, Oregon
So we seem to be getting closer. I get an error now that states Cannon find the configuration file 'custom.bgi' Do you want to create a new file? I had a BGinfo folder that I held all the information in then I copied to the root of the Netlogon folder to see if that would make a difference and it didn't. Still received the same error and I did change the path to how you have it listed above Glenn. For the PATH=Bginfo\bginfo.exe is what I put it to on my config file. So any clue as to why this error? I checked the spelling to make sure I spelled custom.bgi correctly too.

Also the link you put about the user manual gives a 404 error.


Edited by CameronSeward (2014-01-14 11:17 PM)

Top
#208326 - 2014-01-15 06:46 AM Re: BGInfo Win7 and Win8.1 [Re: CameronSeward]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4403
Loc: New Jersey
I fixed the link - the period at the end of the sentence was being interpreted as part of the URL.

I downloaded a copy of BGInfo. I created a simple configuration and saved it as "custom.bgi". From a command prompt, I ran
 Code:
bginfo.exe custom.bgi /timer:0 /accepteula
and verified that it worked as intended.

Next, I copied the custom.bgi and bginfo.exe files to my NetLogon share (\\MyDomain\NetLogon, logged on as a domain admin. From a regular user account, I performed the following:
 Code:
PATH=\\MyDomain\NetLogon;%PATH%
bginfo custom.bgi /timer:0 /accepteula
This verified that BGInfo.exe could be found, but it could not find it's config file. I got the same message you did, asking if I wanted to create a new file.

Next, I changed the command to
 Code:
bginfo.exe \\MyDomain\NetLogon\custom.bgi /Timer:0 /accepteula
and it worked.

Replace "MyDomain" in the examples with your actual domain name. Now, to translate the command that runs during testing to what the login config file needs.

PATH specifies the complete path and command to execute. If no path part is specified, it defaults to the NetLogon folder, so PATH=bginfo.exe will work just fine.

ARGS specifies all of the arguments that the command needs to function. PATH and ARGS are separate so that we can look for the command specified by PATH in multiple standard locations without being confused by the arguments. So, we must specify the ARGS parameter as
 Code:
ARGS=\\MyDomain\NetLogon\custom.bgi /Timer:0 /accepteula
and things should work. This change tells bginfo exactly where to find the file. If you put the Custom.BGI file in a BGInfo folder on the Netlogon share, you'll need to insert "BGInfo\" in front of the "custom.bgi" file name.

What version of ULS are you running? You are using a fairly old (like WinNT old!) method of defining unique shares for each user's home folder and manually mapping them rather than using deep mapping and AD Attribute to manage home folder mapping. Manual mapping will throw an error if a user logs in without a defined share. ULS 2.8.5 introduced the ERROR parameter to WARN or IGNORE mapping failures for these situations. "IGNORE" ignores the error and reports success (Green), while "WARN" reports the error in Yellow without stopping for the error. I'd recommend being at that version or higher and adding the ERROR=IGNORE parameter to your Personal resource.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#208333 - 2014-01-15 06:56 PM Re: BGInfo Win7 and Win8.1 [Re: Glenn Barnas]
CameronSeward Offline
Fresh Scripter

Registered: 2008-07-15
Posts: 13
Loc: Portland, Oregon
Glenn - Thank you. I now have it working. The crazy thing is I felt I put it in that order yesterday but evidently not. It works on my Win 7 and a server 2008 and 2012.

With questions in the last paragraph I honestly don't know how to answer you. I don't know what version of ULS I am running. I inherited the kixtart and I am learning as I am going along. I now have a new manager who may change how we run login scripts. It would be interesting to see what the latest version has to offer and see if that is a direction we would like to go. I do recall at one point editing the Kix.ini I think and then we moved to this format. If this is going backwards then by all means, it would make sense to go forward and a link to that information would be great. -- Thanks again for you time.

Cameron

Top
#208334 - 2014-01-15 07:28 PM Re: BGInfo Win7 and Win8.1 [Re: CameronSeward]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4403
Loc: New Jersey
Cameron,

Good to hear that it's working!

When you log in, the script will briefly display a screen showing some system and user data, followed by the drive mappings. The version of the ULS being run is displayed at the end of the second line - "Kixtart V4.xx. login script version 2.x.x". You can also create a file called "LoginDebug.Log" in your %USERPROFILE% folder - it will contain a wealth of debug data and will identify the script location and version the next time you log in.

Follow the link I posted earlier to get the User Guide. Browse to the web site in my signature and look at the Products page for the Universal Login Script for an overview of what it does. You can also register on our site (name, email, company name - used only for sending code update notices) and download the entire package.

Basically, it's a compiled version of a Kixtart login script. It's been in use now for more than 15 years with many updates and enhancements over that time. It has many advanced features that would normally take significant effort to develop and debug on your own. It's proven to be faster than using GPO's to map drives, and provides more flexibility as well. One of the most compelling reasons that companies use our script is that it requires no programming knowledge to implement. With the new Admin Tool - a GUI interface - management of login scripts can be delegated to L1 or L2 support staff. No need to learn how to edit the LOGIN.INI configuration file!

Finally, we do provide both free and fee-based support for the ULS through our web site and support-at email address. All users get two free email support sessions with 24-hour or less turnaround. Fee-based support is available at a reasonable cost, from training, solving tough configurations, or even complete implementations. Fee-based turnaround is 4 business hours (EST Weekdays, 8 hours weekends).

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.07 seconds in which 0.029 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org