Jump to content

Script not running from a Kix32 login script


Meum
 Share

Recommended Posts

Hi,

my autoit script does not start from a windows loginscript. the loginscript has following structure

from the login.bat (defined in the useraccount in the ADS Domain) starts a kix32 script. This script starts another kix32 script and from that srcipt I start my Autoit script. ( RUN myautoit.exe) The exe is in the Logindir on domain controller. If the user which is loggin in has Admin permissions the the Autoit exe works fine. If the user has no admin rights the there comes a messagebox: Unable to open the script file.

I use the option

Opt("RunErrorsFatal", 0) ;The Tool Runs also On Error. If an Error apears: Var @Error= 1

but that doesnt help.

If I start the login.bat manually from the network share, everything works also fine. Only during the normal windows logon the script produces an error.

I searched the forum, but didnt find anything.

I tried it with a dummy autoit script witch do nothing, it is the same.

Any ideas what there is wrong?

Thank you

Link to comment
Share on other sites

have the last Kix32 script call myautoit.bat.

call myautoit.exe from a batchfile.

I stopped using Kixtart due to access permission and system authority issues. My guess is Kixtart does not pass on inherited rights to *.com and *.exe files.

Additionally, Kix32 looks for UserName.kix and if it doesn't find it it uses Kixtart.kix. Look at the Kixtart Shell command vs the Run command. I think you might need to use Shell instead.

Edited by PerryRaptor
Link to comment
Share on other sites

have the last Kix32 script call myautoit.bat.

call myautoit.exe from a batchfile.

I stopped using Kixtart due to access permission and system authority issues. My guess is Kixtart does not pass on inherited rights to *.com and *.exe files.

Additionally, Kix32 looks for UserName.kix and if it doesn't find it it uses Kixtart.kix. Look at the Kixtart Shell command vs the Run command. I think you might need to use Shell instead.

thx,

from a bat file it dont run also, same thing. I try it with a shell command, on monday i post the result

Link to comment
Share on other sites

copied from davef's sig

If a child program is started with Run + RunAsSet it's like a there's new login session with the child process as the solitary user. Network connections have to be initiated again for the child process itself, it doesn't inherit anything from the parent session because now it's another user. DriveMapAdd will work to add a network connection, but only if it's being called by the child process, i.e. if the child is an AutoIt script, too...

duno if that will help or not, depends on how you run the script and what privlidges it gets

Link to comment
Share on other sites

Hi,

my autoit script does not start from a windows loginscript. the loginscript has following structure

from the login.bat (defined in the useraccount in the ADS Domain) starts a kix32 script. This script starts another kix32 script and from that srcipt I start my Autoit script. ( RUN myautoit.exe) The exe is in the Logindir on domain controller. If the user which is loggin in has Admin permissions the the Autoit exe works fine. If the user has no admin rights the there comes a messagebox: Unable to open the script file.

I use the option

Opt("RunErrorsFatal", 0) ;The Tool Runs also On Error. If an Error apears: Var @Error= 1

but that doesnt help.

If I start the login.bat manually from the network share, everything works also fine. Only during the normal windows logon the script produces an error.

I searched the forum, but didnt find anything.

I tried it with a dummy autoit script witch do nothing, it is the same.

Any ideas what there is wrong?

Thank you

Just for info : i'm working on ADS domain too , i have set compiled autoit script in replacement of login.bat.

I just defined a loginAUTOIT.exe in the useraccounts in the ADS Domain.

It works well although it is not documented : so i don't have a script witch call a script witch call a script etc... this is very powerfull and login run very quickly (just imagine : 200 users login at the morning, calling only ONE file per login, instead of 5-6 differents files : so only 200 I/O access instead of 1000 I/O access.)

About your probleme, what about a PATH problem ? : when you run your login.bat from command prompt, i suppose that you went to the directory in witch login.bat and autoit script is saved. so "RUN myautoit.exe" will works.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...