Remove key
Remove Key
install app
add key
add key
It does not wait for the app to finish installing, once it sends the command, it goes to the next line. Putting in a sleep command can waste a lot of time and i just need to figure out how for the script to know when the application is finished, it will add the keys back. I am a newb with VBScript and my coworkers just say "figure it out yourself" and i have been wasting my day away trying to figure this out. Boss is very anal and requires it a certain way and wants it so when the applications are finished, it will add the key back and not just use a wscript.sleep command.
here is my script so far. Any help would be great. I will take advice or if you want to write it lol. *shrugs*
CODE
Option Explicit
Dim objShell
Set objShell = CreateObject("Wscript.Shell")
objShell.Run "reg add ""HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3"" /v ""1806"" /t REG_DWORD /d 0 /f", 1, True
objShell.Run "reg add ""HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3"" /v ""CurrentLevel"" /t REG_DWORD /d 0 /f", 1, True
WScript.Sleep(10000)
objShell.Run "cmd /c start \\Server\e$\file.msi", 1, True
WScript.Sleep(10000)
objShell.Run "reg add ""HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3"" /v ""1806"" /t REG_DWORD /d 1 /f", 1, True
objShell.Run "reg add ""HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3"" /v ""CurrentLevel"" /t REG_DWORD /d 12000 /f", 1, True
WScript.Quit
Dim objShell
Set objShell = CreateObject("Wscript.Shell")
objShell.Run "reg add ""HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3"" /v ""1806"" /t REG_DWORD /d 0 /f", 1, True
objShell.Run "reg add ""HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3"" /v ""CurrentLevel"" /t REG_DWORD /d 0 /f", 1, True
WScript.Sleep(10000)
objShell.Run "cmd /c start \\Server\e$\file.msi", 1, True
WScript.Sleep(10000)
objShell.Run "reg add ""HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3"" /v ""1806"" /t REG_DWORD /d 1 /f", 1, True
objShell.Run "reg add ""HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3"" /v ""CurrentLevel"" /t REG_DWORD /d 12000 /f", 1, True
WScript.Quit
