Jump to content

Problem to start program on mapped drive


Recommended Posts

Hi!

I'm not able to start a setup from a mapped drive.

The Code:

DriveMapAdd("W:", "\\server\share$\coreldraw11", 0, "domain\name", "password")
FileChangeDir("W:\")
RunAsSet("Administrator", @Computername, "pass")
RunWait("setup /s /v/qn")
RunAsSet()
DriveMapDel("W:")
exit

The error message said that setup.exe couldn't found. I don't know why.

To start with RunWait("w:\setup.exe") brings up the same message.

Anyone an idea?

Wolfgang

Wolfgang Führer

Link to comment
Share on other sites

Hi!

I'm not able to start a setup from a mapped drive.

The Code:

DriveMapAdd("W:", "\\server\share$\coreldraw11", 0, "domain\name", "password")
FileChangeDir("W:\")
RunAsSet("Administrator", @Computername, "pass")
RunWait("setup /s /v/qn")
RunAsSet()
DriveMapDel("W:")
exit

The error message said that setup.exe couldn't found. I don't know why.

To start with RunWait("w:\setup.exe") brings up the same message.

Anyone an idea?

Wolfgang

<{POST_SNAPBACK}>

Hi :D i use this for run any exe prog look my exampel and edit it for you, hope it help you out! :idiot:

AutoItSetOption("WinTitleMatchMode", 2)
         Runwait(@Scriptdir &"\Test.exe", "", @SW_MAXIMIZE)
         WinWait("Test.exe")
         $ln = StatusbarGetText("test.exe", "")
         MsgBox(0, "Title", $ln & @CR & @error)
         WinWait("test.exe")
Edited by DirtyBanditos
Link to comment
Share on other sites

  • Developers

Hi!

I'm not able to start a setup from a mapped drive.

The Code:

DriveMapAdd("W:", "\\server\share$\coreldraw11", 0, "domain\name", "password")
FileChangeDir("W:\")
RunAsSet("Administrator", @Computername, "pass")
RunWait("setup /s /v/qn")
RunAsSet()
DriveMapDel("W:")
exit

The error message said that setup.exe couldn't found. I don't know why.

To start with RunWait("w:\setup.exe") brings up the same message.

Anyone an idea?

Wolfgang

<{POST_SNAPBACK}>

You are using RunAsSet() which is changing the credentials. Are you sure that the Administrator account of the PC can access "\\server\share$\coreldraw11" ?

I tend to do it this way:

Map the drive

copy the file to a PC directory like @TempDir

Run it from this TempDir.

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

Hi!

I tried RunAsSet() at the beginning of the script, too. The mapping and the working dir have been ok, but the error messange was the same :idiot: .

Copying the whole CorelDraw 11 (administrative installation point) on the client pc is not the right way i think. Deleting the copy would be neccesary because of License reasons.

Wolfgang Führer

Link to comment
Share on other sites

  • Developers

Hi!

I tried RunAsSet() at the beginning of the script, too. The mapping and the working dir have been ok, but the error messange was the same  :D .

Copying the whole CorelDraw 11 (administrative installation point) on the client pc is not the right way i think. Deleting the copy would be neccesary because of License reasons.

<{POST_SNAPBACK}>

Well, doesn't matter where you put the RunAsSet() since it only has an effect on Run and RunWait. :idiot:

As far as copying the installer to the pc first: What do you think happens when you run it ?

Copy, Run and then Delete should work but running it from a Server you need to use a account that has the proper rights to the Share you run the installer from.

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

Hi!

I found a solution - much easier :idiot:

RunAsSet("name", "domain", "password")
RunWait("\\server\share$\coreldraw11\setup /s /v/qn")
RunAsSet()

Now the "name" account has to be lokal admin and must have rights on the share.

Mapping with account 1 and starting with account 2 does not run.

Wolfgang Führer

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