Jump to content
Sign in to follow this  
wfuehrer

Problem to start program on mapped drive

Recommended Posts

wfuehrer

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

Share this post


Link to post
Share on other sites
DirtyBanditos

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

Share this post


Link to post
Share on other sites
Jos

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.


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                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
wfuehrer

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

Share this post


Link to post
Share on other sites
Jos

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.


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                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
wfuehrer

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

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.