Jump to content

Can't execute program on network drive


Recommended Posts

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??

Link to comment
Share on other sites

  • Developers

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 etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

  • Developers

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 etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...