Page 1 of 1 1
Topic Options
#173911 - 2007-02-14 04:44 PM MY SendKey command wont respond
selormquarshie Offline
Getting the hang of it

Registered: 2006-12-24
Posts: 85
I am trying to use SENDKEY to answer ok after the SHELL command and continue but it doesn't respond......any idead........

Shell 'C:\WINDOWS\uninst.exe /s -y -f"C:\Program Files\Pivotal\Relation\DeIsl1.isu"'

$rc = SendKeys ("{Enter}")

$RC = Shutdown("","System is being rebooted to enable new settings.", 10, 1, 1)

Else

Quit

EndIf


Edited by selormquarshie (2007-02-15 04:27 PM)

Top
#173932 - 2007-02-15 04:46 AM Re: n [Re: selormquarshie]
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
And your point is? Please post meaningful posts with meaningful subject lines.
_________________________
There are two types of vessels, submarines and targets.

Top
#173940 - 2007-02-15 04:30 PM Re: n [Re: Sealeopard]
selormquarshie Offline
Getting the hang of it

Registered: 2006-12-24
Posts: 85
my point is to have the SENDKEY option automatically answer OK after the install instead of the dialogue box sitting there and displaying "uninstall was successful" and waiting on user to press the ENTER key
Top
#173941 - 2007-02-15 04:36 PM Re: n [Re: selormquarshie]
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
Start with providing a bit more of the script, and post it within code-tags. That snippet is broken already since you didn't post enough..
And I do belive this is highly related to kix..


Edited by Björn (2007-02-15 04:37 PM)
_________________________
as long as it works - why fix it?
If it doesn't work - kix-it!

Top
#173942 - 2007-02-15 04:40 PM Re: n [Re: Björn]
selormquarshie Offline
Getting the hang of it

Registered: 2006-12-24
Posts: 85
Here is the full code......my point is to have the SENDKEY option automatically answer OK after the install instead of the dialogue box sitting there and displaying "uninstall was successful" and waiting on user to press the ENTER key


If Exist ("C:\Program Files\Pivotal\Relation")

If Exist ("C:\Documents and Settings\All Users\Start Menu\Programs\Relationship 99")

Run '"regsvr32 /u Rn1colan.dll",4160,2'
Run '"regsvr32 /u RsMorMSoutlook.exe",4160,2'

Del "C:\Program Files\Pivotal\Relation\Imsync.dll"
Del "C:\Program Files\Pivotal\Relation\Isyncps.dll"
Del "C:\Program Files\Pivotal\Relation\Isysmps.dll"
Del "C:\Program Files\Pivotal\Relation\NserverCa.dll"
Del "C:\Program Files\Pivotal\Relation\NserverCps.dll"
Del "C:\Program Files\Pivotal\Relation\Rn1cdata.dll"
Del "C:\Program Files\Pivotal\Relation\Rn1colan.dll"
Del "C:\Program Files\Pivotal\Relation\Rn1dobj.dll"
Del "C:\Program Files\Pivotal\Relation\Info.exe"
Del "C:\Program Files\Pivotal\Relation\RSMforMSOutlook.exe"
Del "C:\Program Files\Pivotal\Relation\NserverC.exe"

DelProgramItem ("Relationship 99")

;This command line uninstalls Relationship from user computer.

$Msg = MessageBox('Please wait while Relationship is uninstalled','ESI International',,5)

Shell 'C:\WINDOWS\uninst.exe /s -y -f"C:\Program Files\Pivotal\Relation\DeIsl1.isu"'

$rc = SendKeys ("{Enter}")

;This command line will Reboot the computer within 10 seconds after completion of uninstallation

$RC = Shutdown("","System is being rebooted to enable new settings.", 10, 1, 1)

Else

Quit

EndIf

Top
#173943 - 2007-02-15 05:21 PM Re: n [Re: Björn]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
 Originally Posted By: Björn

And I do belive this is highly related to kix..
So then, why is it posted to the Lounge?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#173950 - 2007-02-15 06:28 PM Re: n [Re: selormquarshie]
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
Still missing code-tags \:\)
you have no pause between firing up uninstall, and sending the key,
and no check wether it has been run correctly or not before you simply restart.

@Les, prolly because a mod hasn't moved it yet ;\)


Edited by Björn (2007-02-15 06:29 PM)
_________________________
as long as it works - why fix it?
If it doesn't work - kix-it!

Top
#173956 - 2007-02-15 08:45 PM Re: n [Re: Björn]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
 Originally Posted By: Björn
@Les, prolly because a mod hasn't moved it yet ;\)
Well... it wasn't a mod that put it here in the first place!
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#173964 - 2007-02-16 03:47 AM Re: n [Re: Les]
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Just so you guys know, his initial post did not contain any text and was subsequently added.

Selor: You first need to use SETFOCUS() to set focus onto the Dialog Box, then you can use SENDKEYS() to send the ENTER key to the applications.

Looks like you still haven't found out whether the application supports a silent uninstall?

BTW, have you tried
 Code:
Shell 'C:\WINDOWS\uninst.exe -a -y -f"C:\Program Files\Pivotal\Relation\DeIsl1.isu"'

for a silent uninstall? And read http://support.installshield.com/kb/view.asp?articleid=q100021


Edited by Sealeopard (2007-02-16 03:53 AM)
_________________________
There are two types of vessels, submarines and targets.

Top
#173970 - 2007-02-16 10:43 AM Re: n [Re: Sealeopard]
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
Sealeopard - ah, roger that.
_________________________
as long as it works - why fix it?
If it doesn't work - kix-it!

Top
#173996 - 2007-02-17 03:09 AM Re: n [Re: Björn]
selormquarshie Offline
Getting the hang of it

Registered: 2006-12-24
Posts: 85
I first deleted all the .DLL files...and then SHELL the uninstall command. that works fine.....all i need now is to use SETOPTION and SEDKEY to answer yes after the uninstall does its thing....and i also tried deleting the folder by and it wont!!

NB: how would you rewrite the code to delete the folder and also use sendkey to answer OK after uninstall??

IF EXIST('C:\program files\pivotal')
RD 'C:\program files\pivotal'
EndIF
...........................

If Exist ("C:\Program Files\Pivotal\Relation")

If Exist ("C:\Documents and Settings\All Users\Start Menu\Programs\Relationship 99")

Run '"regsvr32 /u Rn1colan.dll",4160,2'
Run '"regsvr32 /u RsMorMSoutlook.exe",4160,2'

Del "C:\Program Files\Pivotal\Relation\Imsync.dll"
Del "C:\Program Files\Pivotal\Relation\Isyncps.dll"
Del "C:\Program Files\Pivotal\Relation\Isysmps.dll"
Del "C:\Program Files\Pivotal\Relation\NserverCa.dll"
Del "C:\Program Files\Pivotal\Relation\NserverCps.dll"
Del "C:\Program Files\Pivotal\Relation\Rn1cdata.dll"
Del "C:\Program Files\Pivotal\Relation\Rn1colan.dll"
Del "C:\Program Files\Pivotal\Relation\Rn1dobj.dll"
Del "C:\Program Files\Pivotal\Relation\Info.exe"
Del "C:\Program Files\Pivotal\Relation\RSMforMSOutlook.exe"
Del "C:\Program Files\Pivotal\Relation\NserverC.exe"

DelProgramItem ("Relationship 99")

;This command line uninstalls Relationship from user computer.

$Msg = MessageBox('Please wait while Relationship is uninstalled','ESI International',,5)

Shell 'C:\WINDOWS\uninst.exe /s -y -f"C:\Program Files\Pivotal\Relation\DeIsl1.isu"'

$rc = SendKeys ("{Enter}")

;This command line will Reboot the computer within 10 seconds after completion of uninstallation

$RC = Shutdown("","System is being rebooted to enable new settings.", 10, 1, 1)

Else

Quit

EndIf

Top
#173997 - 2007-02-17 03:33 AM Re: n [Re: selormquarshie]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
You have 2 IF but only 1 ENDIF.

As I already told you, you cannot just blindly SendKey() without using SetFocus() to the screen you need to send the [enter] key to.

When you SHELL out to the uninstaller, does the KiX script wait for the uninstall to complete before moving to the next line? If it does, then the SendKey() cannot send the [enter] to the uninstaller!

If it doesn't wait, then you SendKey() the [enter] too soon!
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#173998 - 2007-02-17 03:45 AM Re: n [Re: Les]
selormquarshie Offline
Getting the hang of it

Registered: 2006-12-24
Posts: 85
when the uninstaller completes, it pops up the OK button and i press ENTER before it continues.....someone had suggested AutoIt but that didn't come out too smooth either. How would i use brute force to remove the folder for the program folder cause what i scripted didn't do the trick..which is...

IF EXIST('C:\program files\pivotal')
RD 'C:\program files\pivotal'
EndIF

Top
#173999 - 2007-02-17 03:58 AM Re: n [Re: selormquarshie]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
So, what does @Error and @SError return after the RD?
Are there any subdirectories?
Did you try using the /s switch?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#174000 - 2007-02-17 04:24 AM Re: n [Re: Les]
selormquarshie Offline
Getting the hang of it

Registered: 2006-12-24
Posts: 85
i'm awfully new to kixtart so......this is the entire script...please, anyone look out for any syntax and advice.........What it does is..Remove all .DLL files, use SHELL to uninstall, and remove the progrma folder...

$Msg,$SetOption

If Exist ("C:\Program Files\Pivotal\Relation")

Run '"regsvr32 /u Rn1colan.dll",4160,2'
Run '"regsvr32 /u RsMorMSoutlook.exe",4160,2'

Del "C:\Program Files\Pivotal\Relation\Imsync.dll"
Del "C:\Program Files\Pivotal\Relation\Isyncps.dll"
Del "C:\Program Files\Pivotal\Relation\Isysmps.dll"
Del "C:\Program Files\Pivotal\Relation\NserverCa.dll"
Del "C:\Program Files\Pivotal\Relation\NserverCps.dll"
Del "C:\Program Files\Pivotal\Relation\Rn1cdata.dll"
Del "C:\Program Files\Pivotal\Relation\Rn1colan.dll"
Del "C:\Program Files\Pivotal\Relation\Rn1dobj.dll"
Del "C:\Program Files\Pivotal\Relation\Info.exe"
Del "C:\Program Files\Pivotal\Relation\RSMforMSOutlook.exe"
Del "C:\Program Files\Pivotal\Relation\NserverC.exe"
Del "%AllUsersProfile%\Start Menu\Programs\Relationship 99"
Del "%AllUsersProfile%\Start Menu\Programs\Relationship"


;This command line uninstalls Relationship from user computer.

$Msg = MessageBox('Please wait while Relationship is uninstalled','ESI International',,5)

Shell 'C:\WINDOWS\uninst.exe /s -y -f"C:\Program Files\Pivotal\Relation\DeIsl1.isu"'

RD '"C:\Program Files\Pivotal\Relation" /s'

$ = SetOption ("SendKey","On")

$rc = SendKeys ("{~Enter}")

Else

? "Error Code = " @Error " Error Details = " @Serror

EndIf

Top
#174001 - 2007-02-17 05:01 AM Re: n [Re: selormquarshie]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
You obviously haven't read the manual! You cannot just make this stuff up.
Why nest quotes for RD?
There is no such SetOption()!
There is no such parm as "{~Enter}"!

If you want help, you have to start by reading the manual and listening to advice.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#174005 - 2007-02-17 05:17 AM Re: n [Re: Les]
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
And didn't we already tell you that you need to set the focus on the dialog box? Why don't you do this?

You continue to not heed our advice and complain that the code fragmetns we present don't work. This makes it tiring to help you.

So, read the KiXtart Manual, the FAQ Forum regarding error checking and test your code with proper error checks.
_________________________
There are two types of vessels, submarines and targets.

Top
#174006 - 2007-02-17 03:24 PM Re: n [Re: Sealeopard]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
 Originally Posted By: Sealeopard
And didn't we already tell you that you need to set the focus on the dialog box? Why don't you do this?
Well... since SHELLing is a sync process, it is a moot point. \:\( The OP lacks the skill to understand this and work around it. We lack the patience to guide someone that cannot answer questions and cannot follow advice, choosing instead to take the shotgun approach making up undocumented syntax. The OP's forum posting style is equally haphazard, with multiple threads that are poorly worded and nearly impossible to follow.


Edited by Les (2007-02-17 09:59 PM)
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 1 1


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

Who's Online
0 registered and 323 anonymous users online.
Newest Members
Audio, Hoschi, Comet, rrosell, PatrickPinto
17880 Registered Users

Generated in 0.075 seconds in which 0.026 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