Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: how make "are you sure" prompt in windows batchfile windows 7

01 Jul 2017   #1
Hynt

Windows 7 ultimate 32bit
 
 
how make "are you sure" prompt in windows batchfile windows 7

are running windows 7, got some problem get it work.. have read somthing of commmands thats ben removed in later windows this is what i'm working on...

MS-DOS choice command help

Code:
 @echo off 
set /p var=Are You Sure?[Y/N]:  if %var%== Y goto RestOffProrram if not %var%== Y exit

RestOfProgram:
echo here goes the program codde
PAUSE



My System SpecsSystem Spec
.
01 Jul 2017   #2
torchwood

W7 home premium 32bit/W7HP 64bit/w10 tp insider ring
 
 

You dont need to

UAC set to normal will automatically give you the option.

What are you trying to do

Roy

note incorrect spelling will cause the command to fail
My System SpecsSystem Spec
01 Jul 2017   #3
Hynt

Windows 7 ultimate 32bit
 
 

Have done a small script for backup purposes because the script moves all users files and then deletes them from the c: i want to make sure that the user approves it .. feels a bit like half-time programming otherwise

The problem is that I run the script as admin and then it does not ask if it's okay that the original files are deleted.


my backup script using robocopy Solved - Windows 7 Help Forums
My System SpecsSystem Spec
.

02 Jul 2017   #4
Hynt

Windows 7 ultimate 32bit
 
 

Nobody doing batch?
My System SpecsSystem Spec
02 Jul 2017   #5
samuria

win 8 32 bit
 
 

Why dont you move onto https://www.autoitscript.com/site/autoit/ it compiles to an exe with lots more cmds very simple to write lots of examples https://www.autoitscript.com/autoit3...zip/winzip.htm
My System SpecsSystem Spec
02 Jul 2017   #6
Hynt

Windows 7 ultimate 32bit
 
 

Ok..
My System SpecsSystem Spec
02 Jul 2017   #7
Megahertz07

Windows 7 HP 64
 
 

Using batch files

You can use "if"
My System SpecsSystem Spec
02 Jul 2017   #8
Hynt

Windows 7 ultimate 32bit
 
 

Quote   Quote: Originally Posted by Megahertz07 View Post
Using batch files

You can use "if"
nice.. trying låter. .
My System SpecsSystem Spec
15 Jul 2017   #9
Hynt

Windows 7 ultimate 32bit
 
 

choice /c YN /n /m "Do you want to shutdown computer? (Yes/No) "
if %errorlevel% EQU 1 goto doreboot
if %errorlevel% EQU 2 goto close

echo.An unexpected error has occurred.
echo.
echo.Press any key to continue . . .
pause>nul
My System SpecsSystem Spec
Reply

 how make "are you sure" prompt in windows batchfile windows 7




Thread Tools




Similar help and support threads
Thread Forum
Make "Windows 10 Turn on or Off Camera feature" available in Windows 7
This is the policy setting in Windows 10. It enables or prevents applications and utilities from using the camera device. More on the windows 10 feature, see Turn off or on Camera in Windows 10 How would you go about doing this in Windows 7. Via Elevated Command Prompt or GUI procedure?
Hardware & Devices
"Your Windows isn't Genuine" how can I make this message stop showing?
I'm sorry if this is on the wrong forum section. Some weeks ago I activated my Windows 7 Ultimate 64b and it worked perfectly. But now my computer is nagging about my copy of windows not being genuine. This message keeps popping constantly since yesterday. How can I make it disappear and...
Windows Updates & Activation
"Repair Windows Errors" - audio prompt - source unknown
(I posted this topic earlier on whirlpool.com.au but I thought I'd try my luck copy/pasting it here to see if anyone has any insight on it) I've just encountered an issue that must surely be malware of some kind, but I have no idea what's going on and Googling doesn't shed any light on it. ...
System Security
"load device drivers" prompt while installing windows 7 via usb
Hi great guys at SevenForums. its me again...and this damn ASUS. anyway, I have attempted to install windows 7 via usb to my system(system specs under profile), but i receive a prompt about device drivers and i cannot continue. The image is an original .iso for windows 7 home premium, downloaded...
Installation & Setup
Existing Windows 7 - Adding XP on VHD (external?) to make "dual boot".
Hi guys, Here's the scenario. A while ago I was using Windows XP Pro on my laptop. I was then forced to switch completely to Windows 7, but because I had so many application and configurations done on the XP, I created a VHD from it (using this) before replacing it. Now, I want to know if its...
Installation & Setup


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd

All times are GMT -5. The time now is 11:17.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App