Jump to content
Sign in to follow this  
byoung

Can't execute program on network drive

Recommended Posts

byoung

Hello all,

Any help will be greatly appreciated. I cannot run an exe on a network drive?!? The simple script follows

_______

;Spelling Works

;Basic Studies Lab Computers

;

;run as administrator

; Set the RunAs parameters to use local adminstrator account

RunAsSet("Administrator", @Computername, "password")

;run spelling works tutor program

RunWait("N:\spelwork\ww\ww.exe","N:\spelwork\ww",@SW_MAXIMIZE)

; Reset user's permissions

RunAsSet()

__________

The path is correct and I have the necessary permissions. I can run this program from the windows "Start/Run" dialog box and I can drill down to the exe and run successfully.

The error I get is 'Unable to execute the external program. The system cannot find the path specified.'

What am I missing??

Share this post


Link to post
Share on other sites
Jos

Hello all,

Any help will be greatly appreciated. I cannot run an exe on a network drive?!? The simple script follows

-snip-

What am I missing??

This has been asked many times...

When you do a RunAsSet() it means that all subsequent Run() or RunWait() will use different (in your case Local) credentials and under those credentials the Map you want to use are unknown.

Couple of options:

- when the new credentials have read access you can use the UNC to the file\

- Copy the file to the local PC with the regular credentials and Run this copy with the Admin credentials..

:D


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
byoung

This has been asked many times...

When you do a RunAsSet() it means that all subsequent Run() or RunWait() will use different (in your case Local) credentials and under those credentials the Map you want to use are unknown.

Couple of options:

- when the new credentials have read access you can use the UNC to the file\

- Copy the file to the local PC with the regular credentials and Run this copy with the Admin credentials..

:D

Share this post


Link to post
Share on other sites
byoung

OK, I guess what I want is to use the network administrators credentials not the local computer admin credentials. RunAsSet("Administrator", @Computername, "password") is that possible with the RunAsSet?

Share this post


Link to post
Share on other sites
Jos

OK, I guess what I want is to use the network administrators credentials not the local computer admin credentials. RunAsSet("Administrator", @Computername, "password") is that possible with the RunAsSet?

You mean A Domain account ?

RunAsSet("Administrator", "YourDomainName", "password")

But I would never do that. much to risky .....

I assume all you really need is Admin rights to the PC, so why not use a account that is local to the PC and is part of the Administrators group ?


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        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  

×