Page 1 of 1 1
Topic Options
#175023 - 2007-03-28 02:26 PM Trying to write registry value
Soppy Offline
Fresh Scripter

Registered: 2007-03-28
Posts: 7
I am trying to update the registry for an Outlook setting so I have tried to create a basic kix script (see below). I am trying to run it from a cmd file but I get an error message, unknown command line 1 when I run the cmd file (details below). The files are in the location

login.cmd
@echo off
Kix32 c:\drivers\login2.kix


login.kix
IF keyexist("HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Options\Mail")
$RC=WRITEVALUE("HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Options\Mail","Send Pictures With Document","0","REG_DWORD")
IF @ERROR = 0
? "Value Written to Registry"
ENDIF
ENDIF

Any ideas would be appreciated.

Top
#175024 - 2007-03-28 02:42 PM Re: Trying to write registry value [Re: Soppy]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Include the path to KiX32.exe in your CMD file.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#175027 - 2007-03-28 03:04 PM Re: Trying to write registry value [Re: Soppy]
Soppy Offline
Fresh Scripter

Registered: 2007-03-28
Posts: 7
Tried that, makes no difference. Tried running it with wkix32.exe and got same error. I'll shall try it on a different pc.

Should it work by simply clicking the cmd file or do I need to always run it as a logon script?

Top
#175028 - 2007-03-28 03:27 PM Re: Trying to write registry value [Re: Soppy]
JamesH Offline
Lurker
*****

Registered: 2005-09-20
Posts: 4
Hello Soppy,

As Les mentioned you need to make sure that the kix32.exe file is in the same directory as the batch file or that kix32.exe exists in a directory that is listed in your %PATH% variable. Try copying it to the %systemroot% directory for testing.

James.

Top
#175029 - 2007-03-28 04:10 PM Re: Trying to write registry value [Re: JamesH]
Soppy Offline
Fresh Scripter

Registered: 2007-03-28
Posts: 7
Thanks Les and James

Just tried what you said, all files in root directory, error message below

ERROR: unknown command [yPI]
Script: c:\drivers\login2.kix
Line: 1

When files are not in system root directory or c:\drivers I get different errors, like cannot locate file.

Any ideas as I am baffled to why it is not working.

Top
#175031 - 2007-03-28 04:15 PM Re: Trying to write registry value [Re: Soppy]
eriqjaffe Offline
Hey THIS is FUN

Registered: 2004-06-24
Posts: 214
Loc: Arlington Heights, IL USA
Are you trying to call login.kix or login2.kix? The code example you posted implies a different filename than the script you're trying to call from the .cmd file...although that could just be a typo.
Top
#175032 - 2007-03-28 04:21 PM Re: Trying to write registry value [Re: eriqjaffe]
Soppy Offline
Fresh Scripter

Registered: 2007-03-28
Posts: 7
I have tried 2 scripts, sorry for confusing I should of posted it as same name as in earlier posts. I have checked and cmd file and script file have same names and still no joy
Top
#175033 - 2007-03-28 04:43 PM Re: Trying to write registry value [Re: Soppy]
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
Try sitting down at the computer in question and loging in as administrator then run it again, if it works then it is a security issue.
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#175036 - 2007-03-28 05:13 PM Re: Trying to write registry value [Re: Benny69]
Soppy Offline
Fresh Scripter

Registered: 2007-03-28
Posts: 7
I have full admin rights, I have just logged on to the local computer out of the domain under administrator and still no luck.
Top
#175038 - 2007-03-28 05:41 PM Re: Trying to write registry value [Re: Soppy]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1894
Loc: Hilversum, The Netherlands
Not to be lame but did you actually try from a commandprompt to type:
"C:\KiXtart\kix32.exe" "C:\KiXtart\myscript.kix"
?

Top
#175040 - 2007-03-28 07:12 PM Re: Trying to write registry value [Re: Arend_]
Soppy Offline
Fresh Scripter

Registered: 2007-03-28
Posts: 7
Yep tried that I am really stuck as really need to get our login scripts up and running
Top
#175043 - 2007-03-28 07:52 PM Re: Trying to write registry value [Re: Soppy]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1894
Loc: Hilversum, The Netherlands
Well it works fine here, so either your registry perms are f00ked or you don't have sufficient privilidges. Did you try another machine ?

Also for the record please state the exact location and the exact file names of the kix32.exe and the *.kix file. I wanna replicate this exactly.

Top
#175044 - 2007-03-28 07:58 PM Re: Trying to write registry value [Re: Arend_]
Soppy Offline
Fresh Scripter

Registered: 2007-03-28
Posts: 7
Apronk and thank you to you all.

The only way I could fix it was to copy kix script into a new file and delete old one. The Script and CMD file worked perfectly. Somehow the .kix file I had must of got corrupt. What a pain but got there in the end.

Top
#175046 - 2007-03-28 08:02 PM Re: Trying to write registry value [Re: Soppy]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1894
Loc: Hilversum, The Netherlands
Lol, thats why I only use notepad \:\)
transfer to *nix and the stuff'll get ya \:\) tranfers from French windows as well \:\)

Glad thats solved though \:\)

Top
#175064 - 2007-03-29 03:30 AM Re: Trying to write registry value [Re: Arend_]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
Use notepad, and save as ANSI. I've seen weird stuff happen as a result of saving UTF8 or other formats.

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

Top
#175085 - 2007-03-29 08:55 PM Re: Trying to write registry value [Re: Glenn Barnas]
Adolfo Offline
Fresh Scripter
*****

Registered: 2007-01-25
Posts: 49
Loc: Cali, CO
Add in your login.cmd file

@echo off
PATH X:\YOURKIX32PATH\ %path%
Kix32 c:\drivers\login2.kix

open the kix file using the MS-DOS editor edit.com and
have a look at if text file is ok

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 (Allen) and 382 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.13 seconds in which 0.096 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