install step without it being silent
hi all,
i have a batch file which works when i double click it on windows and it requires for users input to continue or not -
@echo off
echo your PC will uninstall/install new programs and after will shutdown your pc, PLEASE SAVE NOW! Press CTRL+C to abort.
ping -n 30 127.0.0.1>nul
i have created an install step for this batch file but the thing is it runs silently when i deploy it to a computer
how can i get it to pop up on the computer screen so the user can interact with it?
cheers
rob
-
if you run the batch as the logged on user so they can interact with it they would need rights to perform the task on the computer.
If you run it as interactive, they can interact with it even if they themself dont have rights but it will not just show the command pormpt, the interactive popup with apear on the task bar and they will have to click it to enter the interactive area where they see the command window. (Many users wont even notice this and will never look at it)
My option just provides them a popup where they can say yes or no to perform the task.
-
https://www.itsupportguides.com/windows-7/windows-7-shutdown-message-with-countdown-and-cancel/
tested deploying this .hta and have had some success in my test machines. Only problem is it will not display on top of other windows.
-
Here you go, This is a simple VBScript you can run and it will return a code 6 or 7 depending on if they click yes/no and a 6(yes) if the time expires. You can set the steps conditions to succeed or fail depending on the returned number.
Set objShell = CreateObject("Wscript.Shell")
intReturn = objShell.Popup("Do you want to delete this file?", 10, "Delete File", 4 + 32)
If intReturn = 6 Then
Wscript.Exit(6)
ElseIf intReturn = 7 Then
Wscript.Exit(7)
Else
Wscript.Exit(6)
End If
Please sign in to leave a comment.
Comments
11 comments