Hi all,
I'm experimenting with the trial version of Visual Patch 3. One of the key things I need to do with my patch is run a .vbs script after the patch to open a port in Windows Firewall.
Here is my attempt at a one line post patch script to call my VBS script (cfg_firewall.vbs):
result = File.Run("%SystemRoot%\System32\cscript.exe", "//nologo cfg_firewall.vbs //GroupName:\"LaurelCreek\" //RuleName:\"PrecisionTileMulticast\" //ExePath:\"#PROGRAMFILESDIR#\\pt_pro.exe\" //Command:install", "", SW_SHOWNORMAL, true);
What I'm not sure about is how the paths will work out. Does #PROGRAMFILESDIR# expand to the program directory for the program being patched on my user's machine?
Can I reference my cfg_firewall.vbs on my PC even though it is not one of the files in the patch? I do not want this file installed on my user's computer but it would have to be included in the patch in order to run it post-install. Is it automatically bundled inside the patch?
Will %SystemRoot% expand to the windows system root on my user's system?
Thanks!
Phil
PS. Why is the project file so large? It's bigger than the patch it generates!pro_patch_2_0_4_to_2_0_12.vp2
I'm experimenting with the trial version of Visual Patch 3. One of the key things I need to do with my patch is run a .vbs script after the patch to open a port in Windows Firewall.
Here is my attempt at a one line post patch script to call my VBS script (cfg_firewall.vbs):
result = File.Run("%SystemRoot%\System32\cscript.exe", "//nologo cfg_firewall.vbs //GroupName:\"LaurelCreek\" //RuleName:\"PrecisionTileMulticast\" //ExePath:\"#PROGRAMFILESDIR#\\pt_pro.exe\" //Command:install", "", SW_SHOWNORMAL, true);
What I'm not sure about is how the paths will work out. Does #PROGRAMFILESDIR# expand to the program directory for the program being patched on my user's machine?
Can I reference my cfg_firewall.vbs on my PC even though it is not one of the files in the patch? I do not want this file installed on my user's computer but it would have to be included in the patch in order to run it post-install. Is it automatically bundled inside the patch?
Will %SystemRoot% expand to the windows system root on my user's system?
Thanks!
Phil
PS. Why is the project file so large? It's bigger than the patch it generates!pro_patch_2_0_4_to_2_0_12.vp2
Comment