Jump to content
Sign in to follow this  

Help with running a file from a drive mapping.

Recommended Posts

Try this... not tested.

$objFirewall = ObjCreate("HNetCfg.FwMgr")
$objPolicy = $objFirewall.LocalPolicy.CurrentProfile
$objPolicy.FirewallEnabled = FALSE
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.

Share this post

Link to post
Share on other sites


OK...I'm going crazy over this! :)

Can someone else chime in here and give me thier thoughts? :D

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:

DriveMapAdd("W:", $server, 0, $username, $password)
If FileExists("W:\HATScanner.exe") Then
    MsgBox(4096, "", "HATScanner exists.")
    MsgBox(4096,"", "HATScanner does not exist.")
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 :D

I'm greatful for any assistance or ideas. :P

Share this post

Link to post
Share on other sites


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. :D

This is what I reverted to...

DriveMapAdd("", $server, 0, $username, $password)

Thank you to everyone that joined in and helped out with their thoughts. :)

See ya next time and thanks for the help! :D

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...