Page 1 of 1 1
Topic Options
#201699 - 2011-03-04 10:54 PM Registry change
CameronSeward Offline
Fresh Scripter

Registered: 2008-07-15
Posts: 13
Loc: Portland, Oregon
I am trying to change a value in the registry and I have seen it two different ways but neither seem to work.

This is the two line that I need to change and the two ways I have attempted it. If someone could help that would be great.


#$ = writevalue ('HKEY_LOCAL_MACHINE\SOFTWARE\Lightspeed Systems\SecurityAgent' /v "Use Lightspeed" /t REG_DWORD /d 0 /f)
#$ = writevalue ('HKEY_LOCAL_MACHINE\SOFTWARE\Lightspeed Systems\SecurityAgent' /v "TTC Server" /t REG_MULTI_SZ /d ttp.pamplincorp.com /f)

$ReturnCode = AddKey("HKEY_LOCAL_MACHINE\SOFTWARE\Lightspeed Systems\SecurityAgent' /v "Use Lightspeed" /t REG_DWORD /d 0 /f")
If $ReturnCode = 0
? "Key added...."
Endif

$ReturnCode = AddKey("HKEY_LOCAL_MACHINE\SOFTWARE\Lightspeed Systems\SecurityAgent' /v "TTC Server" /t REG_MULTI_SZ /d ttp.pamplincorp.com /f")
If $ReturnCode = 0
? "Key added...."
Endif

Thank you,
Cameron

Top
#201700 - 2011-03-04 11:54 PM Re: Registry change [Re: CameronSeward]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
If I understand what you're trying to enter correctly....Try this...

 Code:
$null = writevalue ("HKEY_LOCAL_MACHINE\SOFTWARE\Lightspeed Systems\SecurityAgent","Use Lightspeed","0","REG_DWORD")
$null = writevalue ("HKEY_LOCAL_MACHINE\SOFTWARE\Lightspeed Systems\SecurityAgent","TTC Server","ttp.pamplincorp.com","REG_MULTI_SZ")

Top
#201704 - 2011-03-06 02:29 PM Re: Registry change [Re: ShaneEP]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
One small comment.
Regular users are not able to write to HKEY_LOCAL_MACHINE. You need to be some kind of admin, use an admin script from one workstation with a user that has admin privileges on all other workstations to all others or temporarily elevate the privileges of the currently logged in user.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#201732 - 2011-03-11 12:12 AM Re: Registry change [Re: Mart]
AshishS Offline
Fresh Scripter

Registered: 2008-10-27
Posts: 20
If your end users are not admin on the local computers, may I suggest making a batch file and call it using runnas with administrator credentials. Thats what I have done in the past however now our end users are local admins so I just code whatever I need done in kix.
Top
#201734 - 2011-03-11 04:21 PM Re: Registry change [Re: AshishS]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
I used to use a program called sanur.exe (runas backwards) combined with the tokenization of the kix scripts using the /t command. It allowed me to pass the password as well as username. It's not a totally secure method by any means, but the scripts were at least obfuscated due to the tokenizing.

http://www.commandline.co.uk/sanur_unsupported/index.html

Top
#201851 - 2011-04-04 10:52 PM Re: Registry change [Re: ShaneEP]
CameronSeward Offline
Fresh Scripter

Registered: 2008-07-15
Posts: 13
Loc: Portland, Oregon
Shane - I attempted to put the two lines into the login.ini file and it still didn't want to go. I am a Enterprise and domain admin and it still doesn't want to change the registry yet the personal folder get mapped. This is what I have in my ini.

[COMMON]
ClearPrinterMappings=n
ForceVisible=y
ClearDriveMappings=y
ClearShareConnections=y
MinimumDisplayTime=15
BEEP=N
$null = writevalue ("HKEY_LOCAL_MACHINE\SOFTWARE\Lightspeed Systems\SecurityAgent","Use Lightspeed","0","REG_DWORD")
$null = writevalue ("HKEY_LOCAL_MACHINE\SOFTWARE\Lightspeed Systems\SecurityAgent","TTC Server","ttp.pamplincorp.com","REG_MULTI_SZ")


[COMMAND definitions]
CLASS=COMMAND
PATH=\\pcc-trackit2\TrackIt8\Audit32.exe
PRIV=null
COMPUTEROUS=!servers,!Domain Controllers,!pamplincom\servers
GROUPS=domain users,

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

Top
#201852 - 2011-04-04 10:54 PM Re: Registry change [Re: CameronSeward]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4572
Loc: USA
Your writevalue lines go in the script itself, and not the ini.
_________________________
(... better days ahead)

Top
#201853 - 2011-04-04 11:50 PM Re: Registry change [Re: Allen]
CameronSeward Offline
Fresh Scripter

Registered: 2008-07-15
Posts: 13
Loc: Portland, Oregon
Allen - I understand you when you say they don't go in the INI file, the part that I am just not getting is where they should go. You said it should be in the script itself. I am obviously missing something because I thought that was the script. The only other files I have in the Netlogon folder are the KIX32.exe and the kixtart.kix file. Is there another file I should have in there that I don't have that the ini file should be calling to run like I do for our Trackit Audit program? Hopefully your next reply will make a light switch go on for me.

Thank you
Cameron

Top
#201854 - 2011-04-04 11:52 PM Re: Registry change [Re: CameronSeward]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4572
Loc: USA
Open kixtart.kix with notepad. That is the main script.
_________________________
(... better days ahead)

Top
#201855 - 2011-04-05 12:28 AM Re: Registry change [Re: Allen]
CameronSeward Offline
Fresh Scripter

Registered: 2008-07-15
Posts: 13
Loc: Portland, Oregon
OK- I am thinking then that my file is corrupt. This is a small sample of what is in that file.

꼚က쳽ꞅ៘縳癈푆া柏�읐鐣콳鄿旔鐇奢ᜆኑ歭ᗾ㴮冤䨝䵶ᢽ጑꾝쌡ꔚퟘꀆ존矵殩�꽂멞ፎ겿憯ퟟ칣큻厈⯦�싎됢≤僭됆헮㹿ﶷ䪻륱䣡昙⽍⦠揓Ǹ컠ꋩ�ꎄᤣ㈛돭昗⏂ᅩ䍝쭍賐獾왗�٪얟唨᧎㹝ᵂ팁৐匤뼌�桔譖य़䣲䜲茢垐哥週錱ბଣ씔擫牌밉橐滛�䫯稃ذ鋛䫡৷伕䑙놷賬ⶑ뚤ڄ昽ନ◆ᬺႬ戗̑㞏玀쵳ㇽ酋➅皸柗꾞눃袳䎴겹몙展㐋ퟡ匮�⨄溶탄⧤㹃�箫앩㌱醿鄜趻没䙪ᬤ셃ꁔ�틴곕堅⃳쥵痬﶐ᵧ窪䪮鍪斍靠命뙂鲅ᰃ惕獨椐搅⇚学壐竽ᐁ씊沞Ꭻဟ慅鉎림舊餋蝏뷢㼿셨ꕾ夐⺞齢૩脮䋶텻癹浲⥣磤쟒墿詯봤鸺種榑握㴻筸栈ゑ䄒ⅻ痋딖㌹眫晑铘煟Ꝥ⸞⼇㸽얗�蛵醜瑜댕쌒㷔․ᐤ初仱胠╡箮ﳻ�ㄺ䋂ꔱ跇罡ꀎ뻘鴤⋯䎼�钛䩔䙞⼎夌遲洢뾮폷ۈ㜣い勱歶⩈힝捃핛턜뱣꫞ầﶥኖ雏漪團䉂뗸誷◰耭뭔㐨嬞诞ﻱ삡�ႂ푅玞欋혟♖ퟬ긗鲒䩱敹饈�犱ꉢ뗫ⷢꈙ送ᵛ긣鲩眶

so is there a link you can give me to download the latest version that will be in a English?

Thanks again for you help.

Top
#201856 - 2011-04-05 12:52 AM Re: Registry change [Re: CameronSeward]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4572
Loc: USA
Okay... one of two options here... either kixtart.kix is tokenized (form of security) or you opened kix32.exe with notepad.

If the kix file is tokenized, then you will have to find the original untokenized kix file, OR you will have to rewrite it from scratch.
_________________________
(... better days ahead)

Top
#201858 - 2011-04-05 03:28 PM Re: Registry change [Re: Allen]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
You are using my Universal Login Script.. it is tokenized. If you wish you can contact me directly for free support on using the login script. Use the contact page on my web site.

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

Top
#201859 - 2011-04-05 03:43 PM Re: Registry change [Re: Glenn Barnas]
Glenn Barnas Administrator Offline
KiX Supporter
*****

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

You can do what you need through a combination of techniques.

First, create a simple Kix script that updates the registry with standard WriteValue() commands. Test it to verify that it works as intended.

VERY IMPORTANT!!! Use Dim to declare all of your variables in your script!
You can use the commands that Shane presented earlier. You don't need to set Break On/Off as this is inherited from the main script. If you read the manual, you will see that external scripts that are CALLed are most efficient, but care should be taken to insure your variable names are unique. A simple way to do this is to insert an underscore at either the beginning or end of your var name. For example: $_Null or $Null_. You can view the latest version of the manual on my web site.

Once your script to update registry values has been tested, simply copy it to the NetLogon share where the Kixtart.Kix file is and then edit the LOGIN.INI file, adding the following section:
 Code:
[REG_UPDATE]
CLASS=COMMAND
METHOD=CALL
PATH=regupdate.kix
This will run the "regupdate.kix" script by calling it directly from the login script. This eliminates the need to invoke Kix32 again and results in faster processing. It also depends on full variable declarations and no global varname conflicts. See the README.TXT file for a full list of variable and function names used in the script.

The example above runs for all users on all computers. Use the appropriate parameters to control execution by group, OU, computer OU, etc..

Also, the following isn't quite correct:
 Code:
[COMMAND definitions]
CLASS=COMMAND
PATH=\\pcc-trackit2\TrackIt8\Audit32.exe
PRIV=null
COMPUTEROUS=!servers,!Domain Controllers,!pamplincom\servers
GROUPS=domain users,
"COMMAND Definitions" should be a unique name, such as "Audit32". Also, PRIV should be either GUEST or ADMIN. If it isn't required, remove it.

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
0 registered and 1452 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.071 seconds in which 0.031 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