Page 1 of 2 12>
Topic Options
#24434 - 2002-07-05 04:19 AM batch file not executing under w2k
Dwayne Offline
Fresh Scripter

Registered: 2002-07-05
Posts: 6
Hi,

We've recently started using kixtart - and i can get all the basic functions to work fine (such as mapping drives, etc) - however i'm having real problems trying to get an executable to run when a user logons using a group policy (we're on W2k)

Scenario:
We're trying to do an updated installation of the notes 5.0.10 client. The unattended installation works fine when run manually - but when i get it to try and launch using kixstart its seems to run but nothing happens.

I've tried using both the run and shell command, creating a batch file, or running the setup directly. Now i can get the kix script to run fine if i do it manually after logging on (by mapping to the netlogon share and running kix manually) but again if i try to use a policy nothing happens - though i can see the script running - and i use the -d switch i can parse through the script but then nothing happens.

Our script at the moment looks like this
(this is just a basic version until i can get it working)

cls
copy "\\%server%\software\Notesr5-10\Clients\notessetup.bat" "c:\lotus\"

run "c:\lotus\notessetup.bat"

and the bat file has this line

\\%server%\software\Notesr5-10\Clients\Setup.exe -s -f1 setup.iss

again it works fine if i run the kix script manually - just not while logging on...

any suggestions would be great...

[ 05 July 2002, 04:26: Message edited by: Dwayne ]

Top
#24435 - 2002-07-05 07:29 AM Re: batch file not executing under w2k
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11548
Loc: CA
Hello Dwayne and welcome to the board.

The batch file is the problem... I think

Try putting a PAUSE in the batch to see if it is even running.

However, you don't even need to copy or use the batch file. If you want to run that command you can run it from KiXtart.

Try something like this...
code:
$RunNotes='"\\%server%\software\Notesr5-10\Clients\Setup.exe -s -f1 setup.iss"'
RUN $RunNotes


Top
#24436 - 2002-07-05 03:24 PM Re: batch file not executing under w2k
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11161
Loc: Boston, MA, USA
As usual, the question is, does the account have the correct permissions to do the install? Normally, you'll need administrative privileges to install applications under Windows 2000
_________________________
There are two types of vessels, submarines and targets.

Top
#24437 - 2002-07-05 04:09 PM Re: batch file not executing under w2k
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22298
Loc: OK
$RunNotes='"\\%server%\software\Notesr5-10\Clients\Setup.exe -s -f1 setup.iss"'
run $RunNotes

is same as:
run "\\%server%\software\Notesr5-10\Clients\Setup.exe -s -f1 setup.iss"

about it being user rights...
if the user can install after logon, it's not about that.
_________________________
!

download KiXnet

Top
#24438 - 2002-07-05 06:27 PM Re: batch file not executing under w2k
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11548
Loc: CA
Yes Lonk it is the same, but now you don't have a variable to test against or log... or easily modify in a larger script.

You can use either way Dwanye, but using the variable gives you more options to use in a larger script.

Perhaps it is also an HKCU structure not being loaded during logon or some other policy.

Top
#24439 - 2002-07-05 06:33 PM Re: batch file not executing under w2k
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
What's this %server% stuff and is it set at the time of logon? What if you hard code it or use a KiX macro?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#24440 - 2002-07-07 09:34 PM Re: batch file not executing under w2k
Dwayne Offline
Fresh Scripter

Registered: 2002-07-05
Posts: 6
Thanks for the replies guys - just to answer some of the questions

1) the permissions are ok - the user account i'm using is a local power user (it has install rights - had fun with that one!) - plus once you've logged on the script runs fine if run manually (running kix32 manually)

2) the %server% is just the server name - (i'm actually using the server name in there not the %server% variable

I'll switch back to using the run command again and see what happens - it seems to be that in the logon process it stops the command from executing - as when you run the command manually there is a distinct pause before it runs - so i was wondering if during the logon process it gets cutoff somehow - i might try and use a sleep statement to get it past some of the logon stage...

i'll post the results! :-)

Top
#24441 - 2002-07-07 09:40 PM Re: batch file not executing under w2k
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22298
Loc: OK
one thought which some of the big boys might verify...

there may be problem using run directly with exe in logon-process.

the logon-process is the parent and when it stops also the exe-process gets stopped.

not sure of this but line:

run "start /wait \\%server%\software\Notesr5-10\Clients\Setup.exe -s -f1 setup.iss"

cheers,
_________________________
!

download KiXnet

Top
#24442 - 2002-07-07 09:46 PM Re: batch file not executing under w2k
kholm Offline
Korg Regular
*****

Registered: 2000-06-19
Posts: 714
Loc: Randers, Denmark
Have you tried to specify the log, using:
run '\\%server%\software\Notesr5-10\Clients\Setup.exe -s -f1setup.iss -f2%Temp%\Notes.log'

The pause could come from the setup trying to write the log to the network drive.

-Erik

Top
#24443 - 2002-07-08 10:24 PM Re: batch file not executing under w2k
Dwayne Offline
Fresh Scripter

Registered: 2002-07-05
Posts: 6
Thanks for those suggestions guys - still no go unfortunately - i even tried mapping a drive and running it from that...

again it all works when i wait till the use has logged on and then run kix manually - its like the command itself isn't running (even trying to get it to log won't work)

now i'm starting to think whether its something we have running at startup (like antivirus software) that is stopping the executable from running

Top
#24444 - 2002-07-08 11:18 PM Re: batch file not executing under w2k
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
the problem may also be the setup.iss.

Not the iss file itself but that it cannot resolve the path to it.

Give it the full path and see...
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#24445 - 2002-07-08 11:24 PM Re: batch file not executing under w2k
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11161
Loc: Boston, MA, USA
If there is no path, it'll use the SETUP.ISS in the \WINNT directory.
_________________________
There are two types of vessels, submarines and targets.

Top
#24446 - 2002-07-08 11:30 PM Re: batch file not executing under w2k
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
ohhh and use Shell instead of Run
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#24447 - 2002-07-08 11:47 PM Re: batch file not executing under w2k
Dwayne Offline
Fresh Scripter

Registered: 2002-07-05
Posts: 6
gave it a whirl - still no guy - though again if i run the script manually after logging on (i map a drive to the netlogon share and then just use the kix32 installnotes.kix command) it works perfectly...
Top
#24448 - 2002-07-10 05:30 AM Re: batch file not executing under w2k
Dwayne Offline
Fresh Scripter

Registered: 2002-07-05
Posts: 6
Hi Guys,

Thought i'd post an update - FINALLY found what the problem was - there was another policy that applied that stated that the logon scripts should be run synchronously - i changed it to 'not configured' changed the other policy to disable that setting (though i already had this - so i don't know why it wasn't overriding the setting - ah well another day) - logged on and away it went - so i think the original policy was stopping the 2nd policy from being applied properly...

gotta love w2k! ;-)

Top
#24449 - 2002-07-10 03:04 PM Re: batch file not executing under w2k
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Dwayne,
Turning off RunLogonScriptSync is probably not the best solution. There is no guarantee that the desktop will be up when you reach a particular line in the script. If you have code that needs to run later in the logon process (well actually after), better to stuff the scriptlet into the RunOnce reg key.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#24450 - 2002-07-10 03:06 PM Re: batch file not executing under w2k
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22298
Loc: OK
les, I don't know.
I've allways used without sync and it works a thread.
_________________________
!

download KiXnet

Top
#24451 - 2002-07-10 04:35 PM Re: batch file not executing under w2k
Chris S. Moderator Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Why not put a shortcut in the Startup folder? Or...better yet, put a entry in the Run or Runonce key in the registry. A power-user should have sufficient rights to do that. In any event, the child script shouldn't run until after the 'desktop' gets started.

{Edit} Of course, if I had read Les' post better, I might have seen that he already suggested that. Doh!

[ 10 July 2002, 16:36: Message edited by: Chris S. ]

Top
#24452 - 2002-07-10 09:28 PM Re: batch file not executing under w2k
Dwayne Offline
Fresh Scripter

Registered: 2002-07-05
Posts: 6
Hey Guys,

Thought i'd better make myself a bit clearer! It doesn't really matter whether the run logonscripts synchronously is enabled or not in the policy i am using to push it out - what *was* the problem was the other policy i had applied to that OU (the first one) which had enabled the logonscripts bit - for some reason the first policy stopped the script in the second policy from working correctly - i reset the first policy (since it didn't need to be on - this is just a Test OU i use to test these sorts of things!) and now it doesn't matter how the second policy is set - the script works fine either way - now i just need to figure out a way to get the user to wait for the install to finish :-)

Top
#24453 - 2002-07-10 09:36 PM Re: batch file not executing under w2k
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22298
Loc: OK
heh, that can be solved in many cases but setfocus is the best.
user tries to do something but setfocus reverts his/her action...

get's them really annoyed! [Big Grin]
_________________________
!

download KiXnet

Top
Page 1 of 2 12>


Moderator:  Jochen, Allen, Radimus, Chris S., Glenn Barnas, ShaneEP, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Jochen) and 201 anonymous users online.
Newest Members
MikeKrausnick, Ruggiero, xempa333, KroodjeBip, Thala
17470 Registered Users

Generated in 0.041 seconds in which 0.011 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