Hey Mark or any of you other VB guru's.
I use a program called PerfectDisk on our network. I'm not a particular fan of the software, but it does help with performance slightly.
The software is client/server based, requiring that each client have several ports opened on their Windows firewall, and a few DLL's and an executable made exceptions as well.
The script they sent me originally required user interaction, and I wanted to remove as much of that as possible.
In the process I cut the script down so bare-bone that I am actually doing more harm then good.
Currently the script is this
What is happening is that this is a startup script, and if the application is not detected as being installed it will error out in the event log. I need to create an if then or some sort of check-sum to detect whether the application has installed properly or not before proceeding.
I use a program called PerfectDisk on our network. I'm not a particular fan of the software, but it does help with performance slightly.
The software is client/server based, requiring that each client have several ports opened on their Windows firewall, and a few DLL's and an executable made exceptions as well.
The script they sent me originally required user interaction, and I wanted to remove as much of that as possible.
In the process I cut the script down so bare-bone that I am actually doing more harm then good.
Currently the script is this
Set WshShell = WScript.CreateObject("WScript.Shell")
pdpath = WshShell.RegRead("HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\PerfectDisk.exe\Path")
pdcommand = "netsh firewall add allowedprogram " & chr(34) & PDPath & "PDEngine.exe" & chr(34) & " PDEngine ENABLE SUBNET"
returncode = WshShell.Run(pdcommand,0,true)
pdcommand = "netsh firewall add allowedprogram " & chr(34) & PDPath & "PDSched.exe" & chr(34) & " PDScheduler ENABLE SUBNET"
returncode = WshShell.Run(pdcommand,0,true)
pdcommand = "netsh firewall add allowedprogram " & chr(34) & PDPath & "PDSchedPS.dll" & chr(34) & " PDSchedPS ENABLE SUBNET"
returncode = WshShell.Run(pdcommand,0,true)
pdcommand = "netsh firewall add allowedprogram " & chr(34) & PDPath & "PDEnginePS.dll" & chr(34) & " PDEnginePS ENABLE SUBNET"
returncode = WshShell.Run(pdcommand,0,true)
pdcommand = "netsh firewall add portopening TCP 135 RPC_PD ENABLE SUBNET"
returncode = WshShell.Run(pdcommand,0,true)
pdcommand = "netsh firewall add portopening TCP 445 DCOM_PD ENABLE SUBNET"
returncode = WshShell.Run(pdcommand,0,true)
What is happening is that this is a startup script, and if the application is not detected as being installed it will error out in the event log. I need to create an if then or some sort of check-sum to detect whether the application has installed properly or not before proceeding.