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
0
Comments
Hi Rob,
Would you deploy the script using the "Run As" option of Deploy User (interactive) and see if this gives you the results you're looking for?
Here you go, they can just click cancel instead of Ctrl+C
mmm i dont know if thats what i need,
basically i want step 1 to give the users an option and a time limit to quit otherwise if they run out of time and dont quit in time it will carry on with the rest of the nested packages?
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.
thanks
wheres the time limit so if for example the computers on but the end user has gone home after the time limit it will continue onto the next nested package otherwise it wont continue to the next package
Need an update to this.
If you want a timeout, the vbscript portion would have to be rewritten to use popup instead of msgbox because msgbox does not support timeouts.
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
sorry guys, I typed it out without testing the code, replace Wscript.Exit with Wscript.Quit
+1 Mmuni
Please sign in to leave a comment.