Sign in to follow this  
Followers 0
aschnabel

Specified path error

10 posts in this topic

I have a program that I need to install on about 500 machines. It is a small self extracting file that loads a .dll into the system32 directory and registers it. The program itself works, under the adminstrator account. My users however, cannot run the program, register the .dll and do what they need to do. I have a folder P:\installs\ebrary\ that has the files ebrary_xp.exe and ebrary.exe. The ebrary.exe files it the script that I created with AutoIt and the ebrary_xp.exe is the self extracting file that loads and registers the dll.

I am using the RunAsSet($userName, $DomainName, $Password) command with those variables defined above.

The only other line in the script is

$val = RunWait("ebrary_xp.exe", "p:\installs\ebrary\", @SW_MAXIMIZE)

I keep receiving "Error: Unable to execute external program. The system cannot find the path specified.

I just started messing with this today and any help would be appreciated. Thank you.

Share this post


Link to post
Share on other sites



I have a program that I need to install on about 500 machines. It is a small self extracting file that loads a .dll into the system32 directory and registers it. The program itself works, under the adminstrator account. My users however, cannot run the program, register the .dll and do what they need to do. I have a folder P:\installs\ebrary\ that has the files ebrary_xp.exe and ebrary.exe. The ebrary.exe files it the script that I created with AutoIt and the ebrary_xp.exe is the self extracting file that loads and registers the dll.

I am using the RunAsSet($userName, $DomainName, $Password) command with those variables defined above.

The only other line in the script is

$val = RunWait("ebrary_xp.exe", "p:\installs\ebrary\", @SW_MAXIMIZE)

I keep receiving "Error: Unable to execute external program. The system cannot find the path specified.

I just started messing with this today and any help would be appreciated. Thank you.

<{POST_SNAPBACK}>

First copy the program you need to run in admin mode to the local pc. then change the credentials with runas() and then run the program from localdisk.

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

First copy the program you need to run in admin mode to the local pc. then change the credentials with runas() and then run the program from localdisk.

<{POST_SNAPBACK}>

I added a line to copy the file which works fine

$val = FileCopy ("P:\installs\ebrary\ebrary_xp.exe", "C:\", 1)

but still get the same message when using the following:

$val = RunWait("ebrary_xp.exe", "c:\", @SW_MAXIMIZE)

Thanks!

Share this post


Link to post
Share on other sites

To test it, make sure the exe is in the same directory as the script you are running. Also sometimes when you change users, you don't have the same mapped drives, this can be a problem.


AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

Maybe @workingdir is different?

You may try

$val = RunWait("c:\ebrary_xp.exe", "c:\", @SW_MAXIMIZE)

Share this post


Link to post
Share on other sites

To test it, make sure the exe is in the same directory as the script you are running.  Also sometimes when you change users, you don't have the same mapped drives, this can be a problem.

<{POST_SNAPBACK}>

Both the file being copied and the script are in the same directory and the drive that is being used is the same for everyone.

not working as well as I had thought. Tried it on a user computer, with user credentials and the file isn't even copying now. I'm sure this has something to do with permissions but I thought the RunAsSet took care of that. The users are plain users on the domain, no special permissions to the computers.

With a plain-joe users, where can I save this file to and what priveledges should I run the script under so that it copies and runs??

Share this post


Link to post
Share on other sites

Both the file being copied and the script are in the same directory and the drive that is being used is the same for everyone.

not working as well as I had thought. Tried it on a user computer, with user credentials and the file isn't even copying now. I'm sure this has something to do with permissions but I thought the RunAsSet took care of that. The users are plain users on the domain, no special permissions to the computers.

With a plain-joe users, where can I save this file to and what priveledges should I run the script under so that it copies and runs??

<{POST_SNAPBACK}>

I am doing something like this and don't have any issue...

Could you post/pm the portion of the script that you have so we can have a look at it?


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

I am doing something like this and don't have any issue...

Could you post/pm the portion of the script that you have so we can have a look at it?

<{POST_SNAPBACK}>

Dim $UserName, $DomainName, $Password

$UserName = "administrator"

$DomainName = "**********"

$Password = "********"

RunAsSet ( $UserName, $DomainName, $Password )

$val = FileCopy ("P:\installs\ebrary\ebrary_xp.exe", "C:\", 1)

$val = RunWait("C:\ebrary_xp.exe", "C:\", @SW_MAXIMIZE)

The P drive is located on one of the servers in the domain. All users can read and copy from it, but cannot write to it. The administrator is an admin account on the domain.

Sorry for the tone of my last post. It was the end of a longm annoying day!

Thanks in advance.

Share this post


Link to post
Share on other sites

Dim $UserName, $DomainName, $Password

$UserName = "administrator"

$DomainName = "**********"

$Password = "********"

RunAsSet ( $UserName, $DomainName, $Password )

$val = FileCopy ("P:\installs\ebrary\ebrary_xp.exe", "C:\", 1)

$val = RunWait("C:\ebrary_xp.exe", "C:\", @SW_MAXIMIZE)

The P  drive is located on one of the servers in the domain. All users can read and copy from it, but cannot write to it. The administrator is an admin account on the domain.

Sorry for the tone of my last post. It was the end of a longm annoying day!

Thanks in advance.

<{POST_SNAPBACK}>

From the looks of it, the users cannot copy anything to the C:\ directory which is why the script doesn't work. They can copy it to their profile path. So, can I copy it to the temp directory in their profile? What path would I use?

$val = FileCopy ("P:\installs\ebrary\ebrary_xp.exe", "'c:\documents and settings\' & @UserName & 'local setting\temp'", 1)

???

Share this post


Link to post
Share on other sites

Dim $UserName, $DomainName, $Password

$UserName = "administrator"

$DomainName = "**********"

$Password = "********"

RunAsSet ( $UserName, $DomainName, $Password )

$val = FileCopy ("P:\installs\ebrary\ebrary_xp.exe", "C:\", 1)

$val = RunWait("C:\ebrary_xp.exe", "C:\", @SW_MAXIMIZE)

The P  drive is located on one of the servers in the domain. All users can read and copy from it, but cannot write to it. The administrator is an admin account on the domain.

Sorry for the tone of my last post. It was the end of a longm annoying day!

Thanks in advance.

<{POST_SNAPBACK}>

I normally use @tempdir like:

Dim $UserName, $DomainName, $Password
$UserName = "administrator"
$DomainName = "**********"
$Password = "********"
$val = FileCopy("P:\installs\ebrary\ebrary_xp.exe", @TempDir & "\", 1)
RunAsSet($UserName, $DomainName, $Password)
$val = RunWait(@TempDir & "\ebrary_xp.exe", @TempDir, @SW_MAXIMIZE)

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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