#57424 - 2001-07-24 02:32 AM
Re: run program silently through logon script
|
Anonymous
Anonymous
Unregistered
|
Awesome! That worked like a charm, thanks erik! Though this script is bullet-proof on NT/2000, it doesn't run quite well on 9X machines LL, I went ahead and used the registry check for uninstall with if and end statement.I'm not sure why it stops when running on 9X in the middle of the script, probably because its on the wrong sleep timing? It doesn't seem to pass beyond the copying process of the install. Probably create a second script for 9X instead ...Can someone point to me how this should be done on 9X? Here is the code:
code:
; check if already installed $Linxuninstall = ReadValue("HKEY_LOCAL_MACHINE\software\microsoft\windows\currentversion\uninstall\Lan-LinX 2000", "uninstallstring") if $Linxuninstall = "" $RC = MessageBox("Your Lan-LinX Phone software will be upgraded." + Chr(13) + "Please be patient while software Installs.","Lan-LinX Phone Software Install",64,60) run( "\\server1\netlogon\setup.exe" ) Sleep ( 2 ) SetFocus( "Lan-LinX 2000 Installation" ) SendKeys("{ENTER}") Sleep ( 1 ) SetFocus( "Type of Installation" ) SendKeys("{DOWN 3}") SendKeys("{ENTER}") Sleep ( 1 ) SetFocus( "Lan-Linx 2000 Installation" ) SendKeys("{ENTER 4}") Do Sleep 1 Until SetFocus( "Installing" ) Do Sleep 1 Until SetFocus("Telephony LAN-Linx Config") = 0 SendKeys("~o") Do Sleep 1 Until SetFocus("Lan-Linx 2000 Installation") = 0 SendKeys("{ENTER}") endif
Also, I was wondering if its possible to run two kix scripts on a batch file at the same time? The reason why I'm asking this is because I want to add a second (separate) kix script that basically runs drive mappings, then runs the software installation.
|
Top
|
|
|
|
#57425 - 2001-07-24 03:58 PM
Re: run program silently through logon script
|
Les
KiX Master
Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
|
Erik, Isn't... Do Sleep 1 Until SetFocus("Telephony LAN-Linx Config") = 0the same as? While $RC = SetFocus("Untitled - Notepad") <> 0 Sleep (1) Loop JVD, You probaably will need to write separate code for W95. Have you tried running it with debug on? That way you can single-step and dump variables to try and get a handle on what is happening. I'm trying to grasp your last question. Are you wanting to run two instances of Kix at one time, one for the usual logon (mapping etc.) and the other for maintenance(installs etc.)? As far as I know they need to run in sequence. Here's a excerpt from my logon bat file:
code:
:KIX_W95_LOCAL %windir%\KIX32.EXE %0\..\NAV.KIX %windir%\KIX32.EXE %0\..\MDM.KIX %windir%\KIX32.EXE %0\..\SC3.KIX %windir%\KIX32.EXE %0\..\O301120.kix GOTO END:KIX_NT_LOCAL %0\..\KIX32.EXE %0\..\NAV.KIX %0\..\KIX32.EXE %0\..\SC3.KIX %0\..\KIX32.EXE %0\..\O301120.kix GOTO END :END EXIT
I know I should combine all the scripts into one with only one call to cut down on the number of times that Kix gets loaded but I just haven't gotten around to it. Also, I don't have much code as my main logon script is on my NetWare server.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.
|
Top
|
|
|
|
#57427 - 2001-07-25 07:30 PM
Re: run program silently through logon script
|
Anonymous
Anonymous
Unregistered
|
hi everyone, I tried modifying the script a little and putting a log file so that it puts it on a centralized location. In this case, I can keep track of who installed the program according to the flag. I setup "authenticated users" to have modify permission on the file.The problem: It doesn't stop installing the program somehow..here is the code: quote:
$linxfile="\\server1\netlogon\lanlinx.ini" $info=ReadProfileString($linxfile,"install",@userid) IF exist($info) = 0 $RC = MessageBox("Your Lan-LynX Phone software will be upgraded." + Chr(13) + "Please be patient while software Installs.","Lan-LinX Phone Software Install/Upgrade",64,60) run( "\\server1\netlogon\setup.exe" ) Sleep ( 5 ) SetFocus( "Lan-LinX 2000 Installation" ) = 0 SendKeys("{ENTER}") Do Sleep 1 Until SetFocus( "Type of Installation" ) = 0 SendKeys("{DOWN 3}") SendKeys("{ENTER}") Sleep ( 1 ) SetFocus( "Lan-Linx 2000 Installation" ) = 0 SendKeys("{ENTER 4}") Do Sleep 1 Until SetFocus( "Installing" ) = 0 Do Sleep 1 Until SetFocus("Telephony LAN-Linx Config") = 0 SendKeys("~o") Do Sleep 1 Until SetFocus("Lan-Linx 2000 Installation") = 0 SendKeys("{ENTER}") IF (WriteProfileString($linxfile,"install",@userid,@date+" "+@time) <> 0) ENDIF ELSE $info=ReadProfileString($linxfile,"install",@userid) ? "Informative INSTALL: software already installed at "+$info endif
Thanks alot. -jImmy
|
Top
|
|
|
|
#57428 - 2001-07-28 01:21 AM
Re: run program silently through logon script
|
Anonymous
Anonymous
Unregistered
|
Hi there,Maybe the runonce-key is an option ? Hai Kir@, Maybe a little too late since you're on vacation, but you can use the RUNONCE-key instead of using SHELL or RUN. For example: code:
$troep=WriteValue("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Runonce","Superdat","C:\superdat.exe","REG_SZ")
Windows will wait patiently with booting after this installation has ended. It works great with msi-installs as t0a5t mentioned before. Also take a look at this thread for automated remote installations: automatedinstall
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 369 anonymous users online.
|
|
|