Page 1 of 2 12>
Topic Options
#67874 - 2002-07-08 04:42 AM .exe will not run during logon
gregb Offline
Fresh Scripter

Registered: 2002-07-08
Posts: 21
I am new to KIXTART and having problems executing the following command line during the logon process.
It works fine if ran after login.
Win98 client
Kixtart V4.10 (RC2)

I have tried a number of different ways.

Try 1) shell "%COMSPEC% /E:1024 /C @LDRIVE\createprf.exe $fullname -Mailbox=emailserver\@userid -default"

Try 2) run @LDRIVE+ "\createprf.exe $fullname -Mailbox=emailserver\@userid -default"

Try 3) run "%COMSPEC% /e:1024 /c c:\createprf.exe $fullname -Mailbox=emailserver\@userid -default"

Thanks
Greg

Top
#67875 - 2002-07-08 06:26 AM Re: .exe will not run during logon
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
welcome on board.
check the info why it wont run by changing:
shell "%COMSPEC% /E:1024 /C @LDRIVE\createprf.exe $fullname -Mailbox=emailserver\@userid -default"

to
shell "%COMSPEC% /E:1024 /K @LDRIVE\createprf.exe $fullname -Mailbox=emailserver\@userid -default"

cheers,
_________________________
!

download KiXnet

Top
#67876 - 2002-07-08 05:01 PM Re: .exe will not run during logon
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
I would set proper quotes, too.
code:
shell '%COMSPEC% /E:1024 /C @LDRIVE\createprf.exe '+$fullname+' -Mailbox=emailserver\'+@userid+' -default'

_________________________
There are two types of vessels, submarines and targets.

Top
#67877 - 2002-07-09 05:05 AM Re: .exe will not run during logon
headbanger Offline
Lurker

Registered: 2002-07-09
Posts: 3
Loc: Perth - Australia
Hi

I have the same problem trying to install wmicore
And if you use the /K option it comes back with invalid command or file not found.
Shell "%COMSPEC% /E:1024 /C \\Server\common\wmi\wmicore.exe /s"
But if you run the same command from a dos prompt on the computers it finds it and runs fine.
\\Server\common\wmi\wmicore.exe /s

Anyone got any Ideas ?

Top
#67878 - 2002-07-09 05:55 AM Re: .exe will not run during logon
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear headbanger,

Welcome to the board.

Try following script:
code:
Shell "%comspec% start /w /c \\Server\common\wmi\wmicore.exe /s"
? "Status KIX: @error (@serror)"

greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#67879 - 2002-07-09 07:32 AM Re: .exe will not run during logon
gregb Offline
Fresh Scripter

Registered: 2002-07-08
Posts: 21
Thanks Lonkero & sealeopard for your suggestions BUT I am still having the same problem.

Like Headbanger, when ran during the login procedure I get "Bad comand or file name" even if I tell it to run from c:\ .

It runs fine after I have logged in.
I thought that there might be a problem passing variables through to the command but if that was the case then it should still not work after I have logged in!!!

I have tested the SHELL command by telling it to do a DIR of c:\. This works fine.

Puzzling ay!

Top
#67880 - 2002-07-09 07:40 AM Re: .exe will not run during logon
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
gregb,

What is $fullname ?

Isn't it supposed to be:

@Fullname

Just curious..

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#67881 - 2002-07-09 07:46 AM Re: .exe will not run during logon
gregb Offline
Fresh Scripter

Registered: 2002-07-08
Posts: 21
Yep Kyder.
It was @fullname at one stage then I thought I try setting up a global variable.

By the way , I forgot to tell you guys that it returns 0 (0) as the @error.

Top
#67882 - 2002-07-09 07:49 AM Re: .exe will not run during logon
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear gregb,

We advise you to try following code.
Before running shell command we create first the command string.

code:
   IF (len(@ldrive) <> 0)
IF (Substr(@ldrive,len(@ldrive),1) = "\")
$cmd=@ldrive+"createprf.exe "+$fullname+" -Mailbox=emailserver\"+@userid+" -default"
ELSE
$cmd=@ldrive+"\createprf.exe "+$fullname+" -Mailbox=emailserver\"+@userid+" -default"
ENDIF
ELSE
$cmd="c:\createprf.exe "+$fullname+" -Mailbox=emailserver\"+@userid+" -default"
? "warning KIX-ldrive: empty value."
ENDIF
? "command to execute: "+$cmd
;
SHELL '%comspec% /c '+$cmd
IF (@error <> 0)
? "Warning KIX: error @error (@serror)"
ENDIF

possible problems are
- @ldrive doesn't return a value.
- @ldrive returns f.e. "c:\" instead of "c:"
Please return the output to the board.
greetings.

[ 09 July 2002, 07:51: Message edited by: MCA ]
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#67883 - 2002-07-09 08:39 AM Re: .exe will not run during logon
gregb Offline
Fresh Scripter

Registered: 2002-07-08
Posts: 21
Problem solved !!
Well at least I know why it is not working.
The problem is that I am using 'roaming' profiles.
It works fine if I disable roaming profiles.

Has anyone here managed to automate the creation of outlook profiles in a 'roaming' environment?

Does profgen work ?

Top
#67884 - 2002-07-09 08:52 AM Re: .exe will not run during logon
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
gregb,

In the FAQ Section, there is a topic that covers this, specifically: Exchange/Oulook Configuration

The PROFGEN.EXE line(s) are commented..

HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#67885 - 2002-07-09 09:06 AM Re: .exe will not run during logon
gregb Offline
Fresh Scripter

Registered: 2002-07-08
Posts: 21
Thanks Kent,

I thought I would try and make my life easier and use 'createprf' but it looks as though I have to use prefgen.

Gregb

Top
#67886 - 2002-07-09 09:09 AM Re: .exe will not run during logon
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Never did catch what version of Outlook you were trying to configure. [Smile]

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#67887 - 2002-07-09 09:13 AM Re: .exe will not run during logon
gregb Offline
Fresh Scripter

Registered: 2002-07-08
Posts: 21
Kent,

Outlook 2000 with exchange 5.5 !

Greg [Eek!]

Top
#67888 - 2002-07-09 09:24 AM Re: .exe will not run during logon
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Hmmm..

This snippet from the FAQ Script should work for you..

code:
             RUN '%WINDIR%\Fixprf.exe "$winntfile" @userid @userid $ExServer'
; -- Had to add a small pause
SLEEP 1
RUN '%WINDIR%\Newprof.exe -p "$winntfile" -x'
;If you want to use PROFGEN, uncomment the next line and comment the one for FIXPRF.EXE
;RUN '%WINDIR%\PROFGEN.EXE %WINDIR%\NEWPROF.EXE -P "%UserProfile%\WINNT.PRF" @userid -r -l'

HTH,

Kent

[ 09 July 2002, 09:24: Message edited by: kdyer ]
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#67889 - 2002-07-09 04:36 PM Re: .exe will not run during logon
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Try setting RunLogonScriptSync=1 as described in W2k/XP - Keep the Window visible on login?

It might also be a problem with the user registry not yet fully loaded when the script is running.
_________________________
There are two types of vessels, submarines and targets.

Top
#67890 - 2002-07-10 10:46 AM Re: .exe will not run during logon
gregb Offline
Fresh Scripter

Registered: 2002-07-08
Posts: 21
Kyden,

I am not getting any errors but no profile is being created ?

Maybe it is the .prf file I am using ?

Any suggestions ?

Top
#67891 - 2002-07-10 10:49 AM Re: .exe will not run during logon
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
fixprf...

it actually is not making new profile but changing the current one.
_________________________
!

download KiXnet

Top
#67892 - 2002-07-10 10:59 AM Re: .exe will not run during logon
gregb Offline
Fresh Scripter

Registered: 2002-07-08
Posts: 21
Well it's not doing that either.

So you are saying that I should not see a outlook profile corresponding to the parameter specified in the FIXPRF command ?

Top
#67893 - 2002-07-10 11:03 AM Re: .exe will not run during logon
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
you are pretty much using the same programs as I.

I have exchange 5.5 and outlook 97 and 2000.

I use newprof directly with my own modification of the default outlook.prf for exchange server.
there has to be one switch turned on...
something like overwrite default or something like that...

check the file generated by fixprf.

cheers,
_________________________
!

download KiXnet

Top
Page 1 of 2 12>


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 1198 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.073 seconds in which 0.027 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