#172841 - 2007-01-16 07:06 PM
Enter registry key, based on info from AD - but with a twist?
|
jon
Fresh Scripter
Registered: 2007-01-15
Posts: 11
|
My previous posts have got me to this stage which is good but I wonder if there is some further way of automation? http://www.kixtart.org/forums/ubbthreads...true#Post172805
IF @WKSTA="TS-SERVER" $User=ReadValue('HKEY_CURRENT_USER\Software\GoldMine\GoldMine Link for Microsoft Outlook','GMUserName') If $User='' Shell 'regedit /s "\\MAIN-SERVER\Support\Goldmine\GISMO\GISMO_@userid.reg"' ?"GISMO Installed for " + @userid Else ?"GISMO Already Installed for " + @userid EndIf EndIf
Basically, where I have GISMO_@userid.reg I have a file created, especially for this user based on their AD login name. I would need to create a unique .reg file for every user.
However, I was wondering if it is possible to enter this value based on some settings already within my AD? But, it's a little more complicated, I'm affraid... I will try to explain...
GoldMine only allows up to 8 charachters in the username. For various reasons, we decided to go with the format of First Name + first letter of Surname. e.g. JOEB for Joe Bloggs or PAULS for Paul Smith etc.
So, instead, I could import a standard .reg file and then follow that with a command that will edit the username registry entry based on the @fullname within Active Directory.
Something along the lines of...
IF @WKSTA="TS-SERVER" $User=ReadValue('HKEY_CURRENT_USER\Software\GoldMine\GoldMine Link for Microsoft Outlook','GMUserName') If $User='NONUSER' Shell 'regedit /s "\\MAIN-SERVER\Support\Goldmine\GISMO\GISMO.reg"' WriteValue("HKEY_CURRENT_USER\Software\GoldMine\GoldMine Link for Microsoft Outlook","GMUserName","@fullname","REG_SZ") ?" GISMO Installed for " + @userid Else ?" GISMO Already Installed for " + @userid EndIf EndIf
This works fine but enters the users Full Name and not the First Name + first letter of Surname
Any ideas on how I can acheive this?
Perhaps I could reference a single file with various entries for each user but this would still require me to make a file up.
|
Top
|
|
|
|
Enter registry key, based on info from AD - but with a twist?
|
jon
|
2007-01-16 07:06 PM
|
Re: Enter registry key, based on info from AD - but with a twist?
|
jon
|
2007-01-18 11:01 PM
|
Re: Enter registry key, based on info from AD - but with a twist?
|
jon
|
2007-01-18 11:06 PM
|
Re: Enter registry key, based on info from AD - but with a twist?
|
NTDOC
|
2007-01-18 11:27 PM
|
Re: Enter registry key, based on info from AD - but with a twist?
|
NTDOC
|
2007-01-17 02:32 AM
|
Re: Enter registry key, based on info from AD - but with a twist?
|
NTDOC
|
2007-01-17 03:24 AM
|
Re: Enter registry key, based on info from AD - but with a twist?
|
jon
|
2007-01-17 08:55 PM
|
Re: Enter registry key, based on info from AD - but with a twist?
|
NTDOC
|
2007-01-18 01:10 AM
|
Re: Enter registry key, based on info from AD - but with a twist?
|
jon
|
2007-01-18 10:34 AM
|
Re: Enter registry key, based on info from AD - but with a twist?
|
Radimus
|
2007-01-18 10:44 AM
|
Re: Enter registry key, based on info from AD - but with a twist?
|
Les
|
2007-01-18 05:04 PM
|
Re: Enter registry key, based on info from AD - but with a twist?
|
jon
|
2007-01-18 08:05 PM
|
Re: Enter registry key, based on info from AD - but with a twist?
|
Radimus
|
2007-01-17 09:00 PM
|
Re: Enter registry key, based on info from AD - but with a twist?
|
Radimus
|
2007-01-16 07:23 PM
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 386 anonymous users online.
|
|
|