#67874 - 2002-07-08 04:42 AM
.exe will not run during logon
|
gregb
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
|
|
|
|
#67877 - 2002-07-09 05:05 AM
Re: .exe will not run during logon
|
headbanger
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
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.
|
|
Top
|
|
|
|
#67879 - 2002-07-09 07:32 AM
Re: .exe will not run during logon
|
gregb
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
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
|
|
Top
|
|
|
|
#67881 - 2002-07-09 07:46 AM
Re: .exe will not run during logon
|
gregb
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
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 ]
|
|
Top
|
|
|
|
#67883 - 2002-07-09 08:39 AM
Re: .exe will not run during logon
|
gregb
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
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
|
|
Top
|
|
|
|
#67885 - 2002-07-09 09:06 AM
Re: .exe will not run during logon
|
gregb
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
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Never did catch what version of Outlook you were trying to configure.
Kent
|
|
Top
|
|
|
|
#67887 - 2002-07-09 09:13 AM
Re: .exe will not run during logon
|
gregb
Fresh Scripter
Registered: 2002-07-08
Posts: 21
|
Kent,
Outlook 2000 with exchange 5.5 !
Greg
|
|
Top
|
|
|
|
#67888 - 2002-07-09 09:24 AM
Re: .exe will not run during logon
|
Kdyer
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 ]
|
|
Top
|
|
|
|
#67890 - 2002-07-10 10:46 AM
Re: .exe will not run during logon
|
gregb
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
|
|
|
|
#67892 - 2002-07-10 10:59 AM
Re: .exe will not run during logon
|
gregb
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
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
1 registered
(Allen)
and 1198 anonymous users online.
|
|
|