Joon Posted January 12, 2007 Share Posted January 12, 2007 Try this... not tested. $objFirewall = ObjCreate("HNetCfg.FwMgr") $objPolicy = $objFirewall.LocalPolicy.CurrentProfile $objPolicy.FirewallEnabled = FALSE RunWait("W:\HATScanner.exe") Link to comment Share on other sites More sharing options...
HockeyFan Posted January 14, 2007 Author Share Posted January 14, 2007 Try this... not tested. $objFirewall = ObjCreate("HNetCfg.FwMgr") $objPolicy = $objFirewall.LocalPolicy.CurrentProfile $objPolicy.FirewallEnabled = FALSE RunWait("W:\HATScanner.exe") Not at work to try this but... The firewall is disabled for ALL XP SP2 PC's...plus our client PC's that this program will run on are all SP1. Link to comment Share on other sites More sharing options...
HockeyFan Posted January 16, 2007 Author Share Posted January 16, 2007 OK...I'm going crazy over this! Can someone else chime in here and give me thier thoughts? In a nut shell, I'm trying to run a program from a mapped drive location, but when I use the RUN command, I get the error message "unable to execute the external program". Here is the code: DriveMapDel("W:") Sleep(1000) DriveMapAdd("W:", $server, 0, $username, $password) Sleep(1000) If FileExists("W:\HATScanner.exe") Then MsgBox(4096, "", "HATScanner exists.") Else MsgBox(4096,"", "HATScanner does not exist.") EndIf Sleep(5000) Run("HATScanner.exe", "W:")oÝ÷ Ù«2¢çÇ"»§j׬¶Ú,yè¶WÆ+-±©ÝÖ¥Á¬¬r±¶Úîy»"jw«®èØ^EC¢iÒ!j÷½éí®'ºÈ§«¢+ÙIÕ¸ ÅÕ½ÐíèÀäÈí!QM¹¹È¹áÅÕ½Ðì°ÅÕ½ÐíèÅÕ½Ðì¤ Is there something I'm missing with the RUN command or using it in conjunction with a drive mapping? :D I'm greatful for any assistance or ideas. Link to comment Share on other sites More sharing options...
HockeyFan Posted January 16, 2007 Author Share Posted January 16, 2007 I've found a work around...I'm not going to use a drive mapping to a spacific drive letter. I didn't really need the drive letter except for a small step in the script, so I'm just going to delete that additional informational step and work without a drive letter. This is what I reverted to... DriveMapAdd("", $server, 0, $username, $password) Run("\\172.29.10.29\ldlogon\HATScanner.exe") Thank you to everyone that joined in and helped out with their thoughts. See ya next time and thanks for the help! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now