Solved

Batch File

Posted on 2007-03-26
8
531 Views
Last Modified: 2010-04-16
Hello Everyone.

I am writing a batch file to uninstall a piece of software (Arkeia Backup Software).  The batch file works until it gets to the point where it ask the question to "Continue" or "Cancel".  Does anyone know the command to tell a batch file to select "continue" and continue running.  

cd %windir%\system32

net stop arkboot
cd\
cd C:\Program Files\Arkeia\Arkeia\bin\
arkboot -remove
cd\
cd C:\Program Files\
rmdir arkeia /s /q
cd\
cd c:\windows\
arkuinst.exe
0
Comment
Question by:CEAllen6216
8 Comments
 
LVL 67

Expert Comment

by:sirbounty
ID: 18793034
try
arkboot /?
it might give you the parameter for that...

Otherwise, I'd imagine you could overcome this with vbscripting, if you're interested...
0
 
LVL 7

Expert Comment

by:avatar-e
ID: 18793050
A pure batch file can't do that but you can call a groundcontrol Windows Macro from batch, however maybe is better do all the unninstalation process automated by GControl.

www.acrasoft.com
0
 
LVL 9

Expert Comment

by:sah18
ID: 18793191
do you know which line is giving you the "continue or cancel" prompt?
0
 

Author Comment

by:CEAllen6216
ID: 18793854
Sirbounty,

I have tried the arkuinst /? but there are no switches.  I would not mind a script but I am not very good with scripts and I need to do this today.  So for me the bat file was suppose to be faster.

sah18,

It is the line with arkuinst.exe

0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 67

Expert Comment

by:sirbounty
ID: 18794334
Try this - save as arkremove.vbs

Dim objShell:Set objShell=CreateObject("Wscript.shell") ' for 'shell' references
Dim objFSO:Set objFSO=CreateObject("Scripting.FileSystemObject") 'file system reference
objShell.Run "net stop arkboot"  'stop the service
objShell.Run "C:\Program Files\Arkeia\Arkeia\bin\arkboot -remove" 'run this command
objFSO.DeleteFolder "C:\Program Files\arkeia", True 'delete this folder
objShell.Run "c:\windows\arkuinst.exe"
Set objFSO=Nothing
Set objShell=Nothing
'end

'Now from the above, the only things you need to be concerned with 'auto' answering the prompt is (1) the window title of the pop up (may need to run it manually once to get the exact title name and (2) timings...

For the timings - where does the popup occur?  After the arkboot -remove?
If so, then adjust the script to this

Dim objShell:Set objShell=CreateObject("Wscript.shell") ' for 'shell' references
Dim objFSO:Set objFSO=CreateObject("Scripting.FileSystemObject") 'file system reference
objShell.Run "net stop arkboot"  'stop the service
objShell.Run "C:\Program Files\Arkeia\Arkeia\bin\arkboot -remove" 'run this command
objShell.AppActivate "Arkboot remove popup" 'activates 'this' window/popup
objShell.SendKeys "~" 'sends an 'enter' key to that window
objFSO.DeleteFolder "C:\Program Files\arkeia", True 'delete this folder
objShell.Run "c:\windows\arkuinst.exe"
Set objFSO=Nothing
Set objShell=Nothing
'end
0
 

Author Comment

by:CEAllen6216
ID: 18794988
Hi SirBounty

Thank You very much for the script.  When I run it, it says it can't find the file specified.  What I notice is that it is not changing to the c:\program files\arkeia\arkeia\bin.  Could this be because I am trying to push it out through SMS
0
 
LVL 67

Accepted Solution

by:
sirbounty earned 500 total points
ID: 18795117
It wouldn't be changing directories but simply calling that executable from that folder...

You might try enclosing it in quotes:

Dim objShell:Set objShell=CreateObject("Wscript.shell") ' for 'shell' references
Dim objFSO:Set objFSO=CreateObject("Scripting.FileSystemObject") 'file system reference
objShell.Run "net stop arkboot"  'stop the service
objShell.Run chr(34) & "C:\Program Files\Arkeia\Arkeia\bin\arkboot -remove" & chr(34) 'run this command
objShell.AppActivate "Arkboot remove popup" 'activates 'this' window/popup
objShell.SendKeys "~" 'sends an 'enter' key to that window
objFSO.DeleteFolder "C:\Program Files\arkeia", True 'delete this folder
objShell.Run "c:\windows\arkuinst.exe"
Set objFSO=Nothing
Set objShell=Nothing
'end

Admin Edit
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18796264
Happy to help! - thanx for the grade!! :^)
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup". After a while, you have entered a loop for Auto repair which does not fix anything and you will be in a  panic as all your work w…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now