m1ndg4m3
asked on
batch file creation
Hi all,
Probably a very noob question, but I am trying to create a batch file to run an executable, which I can do however the executable prompts for a y or n command to continue. What is the switch I need to put into the batch file to give a y confirmation?
Thanks in advanced!!!
Probably a very noob question, but I am trying to create a batch file to run an executable, which I can do however the executable prompts for a y or n command to continue. What is the switch I need to put into the batch file to give a y confirmation?
Thanks in advanced!!!
Hello m1ndg4m3,
Soemtimes you can create a file called y.txt for example, containing the singe y character and then have the following in your batch file:-
executable.exe < y.txt
We really need to know a little more about the program you are trying to run.
Regards,
Robmonster
Soemtimes you can create a file called y.txt for example, containing the singe y character and then have the following in your batch file:-
executable.exe < y.txt
We really need to know a little more about the program you are trying to run.
Regards,
Robmonster
ASKER
Thanks guys. The executable is c:\fsaua-reset.exe it is basically a virus definition clean up utility, it asks for the y or n prompt as soon as it starts.
Regards
Regards
ASKER
ok, I have tried the different commends on the kb article however the exe still seems to sit at the prompt.
would the following be correct?
Cacls c:\fsaua-reset.exe /g administrator:R < c:\yes.txt
or
echo y| cacls c:\fsaua-fsreset.exe /g administrator:R
Regards
would the following be correct?
Cacls c:\fsaua-reset.exe /g administrator:R < c:\yes.txt
or
echo y| cacls c:\fsaua-fsreset.exe /g administrator:R
Regards
Don't include calcs, that's just the example given at the MS site, trying to solve the same problem.
Try:-
echo y | c:\fsaua-fsreset.exe /g administrator:R
Try:-
echo y | c:\fsaua-fsreset.exe /g administrator:R
Does fsaua-reset.exe itself not include a command line option to suppress the need to enter Y or N?
You should try either:
echo y | c:\fsaua-fsreset.exe /g administrator:R
or
fsaua-reset.exe /g administrator:R <c:\yes.txt
yes.txt should contain a single 'y' followed immediately by a carriage-return character and a linefeed character.
To create yes.txt, at a DOS command prompt line type:
copy con yes.txt
then press the 'y' key
then press the carriage-return key (aka the ENTER key)
then press CTRL-Z keys-combination (press and hold down the CTRL key while pressing the 'Z' key)
echo y | c:\fsaua-fsreset.exe /g administrator:R
or
fsaua-reset.exe /g administrator:R <c:\yes.txt
yes.txt should contain a single 'y' followed immediately by a carriage-return character and a linefeed character.
To create yes.txt, at a DOS command prompt line type:
copy con yes.txt
then press the 'y' key
then press the carriage-return key (aka the ENTER key)
then press CTRL-Z keys-combination (press and hold down the CTRL key while pressing the 'Z' key)
Oops!!
You should try either:
echo y| c:\fsaua-fsreset.exe /g administrator:R
or
c:\fsaua-reset.exe /g administrator:R <c:\yes.txt
yes.txt should contain a single 'y' followed immediately by a carriage-return character and a linefeed character.
To create yes.txt, at a DOS command prompt line type:
copy con yes.txt
then press the 'y' key
then press the carriage-return key (aka the ENTER key)
then press CTRL-Z keys-combination (press and hold down the CTRL key while pressing the 'Z' key)
You should try either:
echo y| c:\fsaua-fsreset.exe /g administrator:R
or
c:\fsaua-reset.exe /g administrator:R <c:\yes.txt
yes.txt should contain a single 'y' followed immediately by a carriage-return character and a linefeed character.
To create yes.txt, at a DOS command prompt line type:
copy con yes.txt
then press the 'y' key
then press the carriage-return key (aka the ENTER key)
then press CTRL-Z keys-combination (press and hold down the CTRL key while pressing the 'Z' key)
Oh, and don't forget to press the carriage-return key (aka the ENTER key) at the end of your CTRL-Z
Thank you robmonster for your help
ASKER
Sorry guys no joy
Do not think it makes any difference, but the /g administrator:R part is certainly taken from the MS example, it is a cacls option ...
Good point. Have you tried just....
echo y| fsaua-fsreset
or just
fsaua-reset<yes.txt
echo y| fsaua-fsreset
or just
fsaua-reset<yes.txt
Are you sure that is the executable's name?
A google search on "fsaua-fsreset.exe" comes up with nothing, however a search on "fsaua.exe" comes up with a variety of instances that give the program directory as:
C:\Program Files\F-Secure Internet Security\FSAUA\program\fsa
C:\Program Files\Shaw Secure\FSAUA\program\fsaua
C:\Program Files\Embarq Online Security 8\FSAUA\program\fsaua.exe
C:\Program Files\Orange\AntivirusFire
C:\Program Files\Charter Security Suite\FSAUA\program\fsaua.
C:\Program Files\COGECO Security Services\FSAUA\program\fsa
C:\Program Files\TalkTalk Online Security\FSAUA\program\fsa
It seems clear that it is an F-Secure product you have, but they probably licence it out to some other software suites, utilities, or online scanning services.
An acronym for : "F-Secure Automatic Update Agent" perhaps?
Are you sure that "fsreset" is not a command line switch that you can use with the "fsaua.exe" command like this?:
fsaua.exe -fsreset
OR
fsaua.exe /fsreset
Could you please do something for us. Open a new Command Window and type in the following separate commands:
cd \
fsaua /?
If that doesn't work, then try different permutations of the "help" switch like /h /help -? -h -help --? --h --help
It's practically impossible to avoid all the uploaded HiJack This reports when I try to search for "fsaua.exe command line options", because the HiJack This reports have a footer that quotes "command line options", and this is the sort of relevant content that it finds:
O23 - Service: F-Secure Automatic Update Agent (FSAUA) - F-Secure Corporation - C:\Program Files\Charter High-Speed Security Suite\FSAUA\program\fsaua.
In HiJack This log files, "023" is a "Service".
BillDL
Nice detective work.... I could not find anything under the given exe name either. I'm inclined to think you're right on your assumptions.
Unless the exe has been renamed.
Nice detective work.... I could not find anything under the given exe name either. I'm inclined to think you're right on your assumptions.
Unless the exe has been renamed.
ASKER
Thanks for your efforts, although that is definately the exe name. It is a virus definition cleanup utility sent to me by f-secure, I can attach it as a zip file if you are willing to trust that it is virus free.
Go on then....
In one of your earlier comments, you said:
"The executable is c:\fsaua-reset.exe it is basically a virus definition clean up utility".
Ignoring the possibility that you may have the actual executable name rolled in with a command line switch, when you say "virus definition cleanup utility" do you mean that it cleans up viruses, or cleans up the definition files used by (an) anti-virus program?
If you are trying to get rid of viruses, then from what I have found in cached copies of the F-Secure product Release Notes, the Command Line program is "fsav.exe". Going back to my earlier searches for fsaua.exe, I see that "fsav.exe" should be found in the "AntiVirus" folder
C:\Program Files\Shaw Secure\Anti-Virus\fsav32.e xe
where the fsaua.exe program is in its own "FSAUA" folder.
C:\Program Files\Shaw Secure\FSAUA\program\fsaua .exe
Here's an extract from one of the F-Secure Release Notes I found with regard to command line scanning:
>>>>>>>>>>>>>>>>>>>>>>>>>>
Command-line scanner and scheduled scanning tasks may find more spyware than scanning tasks executed from user interface [55119]
In some cases, the command-line scanner and scheduled scans may find more spyware than manual scanning task executed from user interface (UI). These two scanning methods are related because the scheduled scanning tasks actually use the command-line scanner (fsav.exe). There are a couple of reasons for this:
The command-line scanner runs the scans with a slightly different scanning engines configuration.
The scheduled scans run under a different user account (Local System, as opposed to the currently logged on user account used for UI-started scanning tasks). The Local System account has access to some folders where the user does not have access, like the System Restore folder.
These differences are minor and not significant from the system's security point of view. UI-started tasks will be able to find spyware that pose a security threat in any case. Examples of the minor spyware detection differences are:
The command-line scanner can find tracking cookies that are not active but have been copied from the cookies folder to some other folder by the user.
The scheduled scans can find previously deleted malware items from the System Restore folder.
<<<<<<<<<<<<<<<<<<<<<<<<<<
"The executable is c:\fsaua-reset.exe it is basically a virus definition clean up utility".
Ignoring the possibility that you may have the actual executable name rolled in with a command line switch, when you say "virus definition cleanup utility" do you mean that it cleans up viruses, or cleans up the definition files used by (an) anti-virus program?
If you are trying to get rid of viruses, then from what I have found in cached copies of the F-Secure product Release Notes, the Command Line program is "fsav.exe". Going back to my earlier searches for fsaua.exe, I see that "fsav.exe" should be found in the "AntiVirus" folder
C:\Program Files\Shaw Secure\Anti-Virus\fsav32.e
where the fsaua.exe program is in its own "FSAUA" folder.
C:\Program Files\Shaw Secure\FSAUA\program\fsaua
Here's an extract from one of the F-Secure Release Notes I found with regard to command line scanning:
>>>>>>>>>>>>>>>>>>>>>>>>>>
Command-line scanner and scheduled scanning tasks may find more spyware than scanning tasks executed from user interface [55119]
In some cases, the command-line scanner and scheduled scans may find more spyware than manual scanning task executed from user interface (UI). These two scanning methods are related because the scheduled scanning tasks actually use the command-line scanner (fsav.exe). There are a couple of reasons for this:
The command-line scanner runs the scans with a slightly different scanning engines configuration.
The scheduled scans run under a different user account (Local System, as opposed to the currently logged on user account used for UI-started scanning tasks). The Local System account has access to some folders where the user does not have access, like the System Restore folder.
These differences are minor and not significant from the system's security point of view. UI-started tasks will be able to find spyware that pose a security threat in any case. Examples of the minor spyware detection differences are:
The command-line scanner can find tracking cookies that are not active but have been copied from the cookies folder to some other folder by the user.
The scheduled scans can find previously deleted malware items from the System Restore folder.
<<<<<<<<<<<<<<<<<<<<<<<<<<
Yes please, could you zip it up and upload it for us to see. You will have to rename it by changing the .exe extension to .txt before zipping it, because the site won't allow uploads of *.exe files, even inside zip files.
ASKER
Nope, forget what I was guessing. Here's the documentation for the utility program:
http://www.f-secure.com/en_EMEA/support/knowledgebase/article-details.html?id=1334
ftp://ftp.f-secure.com/support/tools/FSAUA-Reset
ftp://ftp.f-secure.com/support/tools/FSAUA-Reset/fsaua-reset.exe
ftp://ftp.f-secure.com/support/tools/FSAUA-Reset/readme.txt
http://www.f-secure.com/en_EMEA/support/knowledgebase/article-details.html?id=1334
ftp://ftp.f-secure.com/support/tools/FSAUA-Reset
ftp://ftp.f-secure.com/support/tools/FSAUA-Reset/fsaua-reset.exe
ftp://ftp.f-secure.com/support/tools/FSAUA-Reset/readme.txt
use the -s option
Use:
c:\fsaua-fsreset.exe -s
to suppress prompting
c:\fsaua-fsreset.exe -s
to suppress prompting
Thanks for that, we can test it out with some switches and see what happens.
fsaua-reset -? > Fsaua_Reset_Usage.txt
F-Secure Automatic Update Agent - Reset Tool (8.22 build 2011)
Copyright (c) F-Secure Corporation 2007. All rights reserved.
-? for help
This tool will re-initialize F-Secure Automatic Update Agent and Server versions 6.00 and later.
fsaua-reset [-options]
[options]
-s silent, do not ask to confirm
-v verbose mode
So, the switch you are looking for is the -S
fsaua-reset -? > Fsaua_Reset_Usage.txt
F-Secure Automatic Update Agent - Reset Tool (8.22 build 2011)
Copyright (c) F-Secure Corporation 2007. All rights reserved.
-? for help
This tool will re-initialize F-Secure Automatic Update Agent and Server versions 6.00 and later.
fsaua-reset [-options]
[options]
-s silent, do not ask to confirm
-v verbose mode
So, the switch you are looking for is the -S
Aaaah, you're so quick t0t0. 2 minutes too quick :-)
BillDL
The file is compressed and renamed as txt. Uncompress the file and rename it to an exe. The help switch is -?. There are basically two command line options -s and -v (silent mode and verbose mode). The -s option does not ask for confirmation.
The file is compressed and renamed as txt. Uncompress the file and rename it to an exe. The help switch is -?. There are basically two command line options -s and -v (silent mode and verbose mode). The -s option does not ask for confirmation.
Isn't it your dinner time t0t0? That way I can play without fear of being beaten to the answer ;-)
So are you....
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That cracked it! thanks very much to all who helped I really appreciate it, I have split the points so I hope everyone is happy with that.
Best Regards
m1ndg4m3
Best Regards
m1ndg4m3
Not yet, I just had another thought about the issue of "prompts".
m1ndg4m3
If you were emailed this file, or if you downloaded it, to an XP system, then it is probable that it will have metadata in it that identifies it as an unknown source and will always issue you with a security prompt unless you "trust" it.
I have attached a screenshot of the security warning you will get when you run the program if it hasn't been unblocked. You can untick the box and it won't prompt again. Alternatively, Right-Click on the *.exe file and choose "Properties". Click the "Unblock" button and the "Apply" button will become available.
Open-File-Security-Warning.jpg
Unblock-Button.jpg
m1ndg4m3
If you were emailed this file, or if you downloaded it, to an XP system, then it is probable that it will have metadata in it that identifies it as an unknown source and will always issue you with a security prompt unless you "trust" it.
I have attached a screenshot of the security warning you will get when you run the program if it hasn't been unblocked. You can untick the box and it won't prompt again. Alternatively, Right-Click on the *.exe file and choose "Properties". Click the "Unblock" button and the "Apply" button will become available.
Open-File-Security-Warning.jpg
Unblock-Button.jpg
Whoops, I second-guessed another possibility prematurely. That's great. Now I'm off to eat. Thank you m1ndg4m3.
Blimey BillDL.... You're gonna have to reheat your Pot Noodle.
Typical command options are:
echo y | COMMAND
where COMMAND is your executable