Solved

Batch File

Posted on 2007-03-26
8
535 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

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
 
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You may have already been in the need to update a whole folder stucture using a script. Robocopy does it well and even provides a list of non-updated files in a log (if asked to). Generally those files that were locked by a user or a process by the …
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

770 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