Sign in to follow this  
Followers 0
sadman13

Home folder causing error

5 posts in this topic

When using autoit to install an app if the user has a home folder drive (e.g z drive other letters have been used) the error . Manual mapped drives do not affect the install.

unable to execute the external program

the directory name is invalid

i have even set it to copy the files to local c: and then run the script from there but still the same error.

This is my little script

$USERNAME = "xxxxxx"

$DOMAIN = "xx"

$PASSWORD = "xxxxxxx"

RunAsSet($USERNAME, $DOMAIN, $PASSWORD)

DirCopy("\\ridist01\SoftDist\authorwa", "C:\temp", 1)

run("c:\temp\authorwa.exe")

RunAsSet()

Any help much appreciated

Share this post


Link to post
Share on other sites



The script is to deploy from active directory authorware files and reg settings to client machines.

The elevated privilages account is required to be able to install it under the users login.

not trying to install it to the users home folder just to the local c: drive it just gets the eror message when the home folder is present.

Thanks

Share this post


Link to post
Share on other sites

what is your prog doing? (authorwa)

on most systems you are not allowed to write to a home-directory

just try to login as admin and don't use runasset() this is what i do

no very helpful, but the only thing i can think about at the moment

Why not copy to the Temp directory?

$USERNAME = "xxxxxx"
$DOMAIN = "xx"
$PASSWORD = "xxxxxxx"
$InstDir = @TempDir & '\SoftDist'

DirCreate($InstDir)
RunAsSet($USERNAME, $DOMAIN, $PASSWORD)
DirCopy('\\ridist01\SoftDist\authorwa', $InstDir, 1)
Run( '"' & $InstDir & '\authorwa.exe"', $InstDir)
RunAsSet()

If you're RunAsSet user has Administrator level rights, and shouldn't have a problem using the user's temp directory to copy to run the installation.

If you want to copy it to a place where all users have sufficient rights, you could use @AppDataCommonDir instead of @TempDir.

The quotes are set up in the Run line to ensure working with @AppDataCommonDir, and it's always a good idea to set the default directory rather than letting it work itself out, and typically an installation likes to run from the directory it's in.

Share this post


Link to post
Share on other sites

That works a treat

Thanks very much

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  
Followers 0