Page 1 of 1 1
Topic Options
#41263 - 2003-06-09 03:40 PM Running script after logon
Stephen Wintle Offline
Seasoned Scripter

Registered: 2001-04-10
Posts: 444
Loc: England
Hi,

I am having difficulty getting my script to run on my w2k clients AFTER logon, the script needs to run then as it is updating current user reg keys. However the RUN option in poledit, default computer, even when ticked and I enter the following line "c:\winnt\kix32.exe hiddrv.kix" no joy!

Can I use kix to some how set this up during my login process using my current kix login script (I have 2 kix scripts 1 before and 1 after login). This way I can prompt the client to run 'hiddrv.kix' after login process.

The following key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" seems to give an indication that I can enter my details here but their dosen't seem to be a HKCU equivilent.

Steve
_________________________
Dont worry because a rival imitates you. As long as they follow in your tracks they cant pass you!

Top
#41264 - 2003-06-09 03:50 PM Re: Running script after logon
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Steve, on NT4+ the HKCU Run key isn't created by default. Just proceed to create the key yourself and see if it works, example:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run = "cmd /c dir c:\ >c:\test.txt"

Logoff and log back and Bob's your uncle I think.

-Shawn

[ 09. June 2003, 15:51: Message edited by: Shawn ]

Top
#41265 - 2003-06-09 03:52 PM Re: Running script after logon
AzzerShaw Offline
Seasoned Scripter
****

Registered: 2003-02-20
Posts: 510
Loc: Cheltenham, England
Just a thought.....

quote:

even when ticked and I enter the following line "c:\winnt\kix32.exe hiddrv.kix"

Have you tried "%systemroot%\kix32.exe hiddrv.kix" ?
_________________________
If at first you don't succeed, try again. Then quit. There's no use being a damn fool about it. - W.C Fields

Top
#41266 - 2003-06-11 12:04 AM Re: Running script after logon
Stephen Wintle Offline
Seasoned Scripter

Registered: 2001-04-10
Posts: 444
Loc: England
Ok now I seem to have go the script running but it comes with a very odd message! Get this, for sometime now we have been running kixforms to provide gui's on our win98 clients with success, having migrated from kixgui. The odd thing is that only on our w2k clients do we get the error kixgui not registered.

Now the old scripts did have this error message as an output to the screen, but no longer as I changed them all over to kixforms, ive checked all the servers to make sure of this. I cant understand where its getting this old script from! Any idea?

Steve.
_________________________
Dont worry because a rival imitates you. As long as they follow in your tracks they cant pass you!

Top
#41267 - 2003-06-11 12:41 AM Re: Running script after logon
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
To date, I have had no problem updating HKCU keys from with the logon script on NT/W2K/XP computers.

Win9x computers were a different story.

Have you tried just updating the keys/values without trying to run the script after logon?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#41268 - 2003-06-10 01:57 PM Re: Running script after logon
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
quote:
The odd thing is that only on our w2k clients do we get the error kixgui not registered.
How are you registering the DLL? Admin rights are required on NT/2K/XP to register it.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#41269 - 2003-06-10 02:09 PM Re: Running script after logon
Stephen Wintle Offline
Seasoned Scripter

Registered: 2001-04-10
Posts: 444
Loc: England
I use the following script to register the kixgui...
code:
 if @inwin = "1"
shell "%COMSPEC% /c %WINDIR%\System32\Regsvr32 /s %WINDIR%\SYSTEM\KiXFORMS.dll"
else
shell "%COMSPEC% /c %WINDIR%\System\Regsvr32 /s %WINDIR%\SYSTEM\KiXFORMS.dll"
endif

Steve.

[ 10. June 2003, 14:13: Message edited by: Stephen Wintle ]
_________________________
Dont worry because a rival imitates you. As long as they follow in your tracks they cant pass you!

Top
#41270 - 2003-06-10 02:14 PM Re: Running script after logon
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
1. You don't mention admin rights.

2. You pass the wrong path.

shell "%COMSPEC% /c %WINDIR%\System32\Regsvr32 /s %WINDIR%\SYSTEM\KiXFORMS.dll"

should be:

shell "%COMSPEC% /c %WINDIR%\System32\Regsvr32 /s %WINDIR%\SYSTEM32\KiXFORMS.dll"
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#41271 - 2003-06-10 02:29 PM Re: Running script after logon
Stephen Wintle Offline
Seasoned Scripter

Registered: 2001-04-10
Posts: 444
Loc: England
You say that I am passing the wrong path? How am I if the kixforms dll resides in this dir? It works fine from the win98 machines why should it not work fine from w2k? I am running the script as administrator and have full access rights, also I have registered the dll manually in the same manner and it works....

Steve.
_________________________
Dont worry because a rival imitates you. As long as they follow in your tracks they cant pass you!

Top
#41272 - 2003-06-10 02:35 PM Re: Running script after logon
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Well, I put the DLL in SYSTEM32 and assumed everyone elso would too. [Embarrassed]
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#41273 - 2003-06-10 02:50 PM Re: Running script after logon
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
There is nothing inherently wrong with putting kixforms.dll (any COM object actually) in a seperately directory. In fact, I have mine sitting in a directory called C:\kixforms\release, but Les's point about putting it in SYSTEM32 has validity, but just not necessarily in your case.

Since you are providing the full qualified path to the DLL, it should work and in fact does wortk. The "gotcha" with doing this lies with REGSVR32 itself - its has some (imho) strange behavior. If one doesn't specify the fully qualified path to regsvr, it FIRST looks in SYSTEM32 for the DLL and if found, registers that one, only if its not found in system32 will it look in the current directory. Its kinda ass-backwards in my mind.

I have been bitten by this many times in the past since i tend to register the DLL by hand, and i dont usually specify the full path. If i have an old copy in SYSTEM32 it takes that one instead. Then i proceed to bang my head against the desk wondering why my changes arent taking effect.

Anyway, these comments are NOT directed at you because from what I can see, you are doing all the right things. I think what we will need to see is the piece of code that checks for registration and that pumps out this message.

-Shawn

[ 10. June 2003, 14:51: Message edited by: Shawn ]

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 837 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.058 seconds in which 0.022 seconds were spent on a total of 12 queries. Zlib compression enabled.

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