Jump to content

Recommended Posts

Posted

I have a login script that calls an autoit executable, the auto it run an installation as the administrator.

When I run the Batch file while logged it the process completes successfully. WHen I run it while logging in I recieve the following error:

Autoit Error:

Line 0 (File "\\docstar\setup\test1.exe")

Run ("\\DOCSTAR\SETUP/setup.exe /s")

Error: Unable to execute the external program.

The directory name is invalid.

I have tryed running this with a mapped drive as well that did not work.

I also disabled the group policy that forces a login script to complete prior loading the desktop.

Any Ideas?

; <AUT2EXE VERSION: 3.1.1.0>

; ----------------------------------------------------------------------------
; <AUT2EXE INCLUDE-START: C:\Program Files\AutoIt3\Examples\Docstarinstall.au3>
; ----------------------------------------------------------------------------

;Credentials
$USERNAME = "admin user"
$Password = "password"
$Domain = "domain"

 
;Check the version
$ver = FileGetVersion("C:\Docstar\dsclient.exe")
IF $ver <> "3.4.0.9" Then
; Note the versions listed have an extra 0 in them so for 3.5.4 it will be 3.5.0.4
 
;Message to users. Can be commented out if not needed, Installation will not start until OK is pressed.
MsgBox(0, "Important DocSTAR Update", "A Docstar Update is currently being applied, please" & @CRLF & "do not launch DocSTAR until the update has completed" & @CRLF & "and you have rebooted your computer (You will recieve" & @CRLF & "a prompt to reboot when the update has completed). You" & @CRLF & "can use your computer while the update is being preformed." & @CRLF & "If DocSTAR starts automatically you will need to close it" & @CRLF & "before the install will start")
 
;Wait 2 minutes before starting the installation
;Sleep(1200000)
 
;Check to make sure Docstar is not running
WinWaitClose("DocSTAR")

;Login as the user specified above
Runasset ($username, $Domain, $password)

;Run the installation. Note: Do not change the orientation of the slashes.
Run("\\docstar\setup\Setup.exe /s")
 
Endif


; ----------------------------------------------------------------------------
; <AUT2EXE INCLUDE-END: C:\Program Files\AutoIt3\Examples\Docstarinstall.au3>
; ----------------------------------------------------------------------------
Posted

I have tryed using group policy to call the autoit executable as well that had the same result.

I then tryed to disable all local group policies, that had the same results as well.

I am sure that the problem is envirenmental becuase it works fine in my test envirenment, but I am not sure what is causing the issue. Can it be that what ever is calling the autoit file does not have permissions to access the setup.exe?

Posted (edited)

Autoit Error:

Line 0 (File "\\docstar\setup\test1.exe")

Run ("\\DOCSTAR\SETUP/setup.exe /s")

Error: Unable to execute the external program.

The directory name is invalid

Is the forward slash a typo?

It seems to be okay in the code that you posted.

Edit (okay within the code block)

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Posted

I do not see \\docstar\setup\test1.exe anywhere within the code block posted.

Could you run it again and use the "AutoIt Window Info" tool to copy/paste/post the error?

[size="1"][font="Arial"].[u].[/u][/font][/size]

Posted

You might check that the file is being found as expected... but only if a "non-admin user" can "see" the file - since RunAsSet does not impact the FileExists check.

;Check to make sure Docstar is not running
WinWaitClose("DocSTAR")

;Login as the user specified above
RunAsSet($username, $Domain, $password)


;;;;;;;;;;inject this as a test
MsgBox(0, "", FileExists("\\docstar\setup\Setup.exe"))
;;;;;;;;;;inject this as a test


;Run the installation. Note: Do not change the orientation of the slashes.
Run("\\docstar\setup\Setup.exe /s")

[size="1"][font="Arial"].[u].[/u][/font][/size]

Posted

A non admin user can read the file. Like I said the autoit executable works fine when it is not called by a login script.

Here is what the autoit window info tool reported:

Press CTRL-ALT-F to pause the display.

>>>>>>>>>>>> Window Details <<<<<<<<<<<<<

Title: AutoIt Error

Class: #32770

Size: X: 363 Y: 306 W: 303 H: 185

>>>>>>>>>>> Mouse Details <<<<<<<<<<<

Screen: X: 39 Y: 6

Cursor ID: 2

>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<

RGB: Hex: 0x9EE8FF Dec: 10414335

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<

Size:

Control ID:

ClassNameNN:

Text:

>>>>>>>>>>> Status Bar Text <<<<<<<<<<<

>>>>>>>>>>> Visible Window Text <<<<<<<<<<<

OK

Line 0 (File "\\docstar\setup\Test1.exe"):

Run("\\docstar\SETUP\SETUP.exe /s")

Error: Unable to execute the external program.

The directory name is invalid.

>>>>>>>>>>> Hidden Window Text <<<<<<<<<<<

Posted

A non admin user can read the file. Like I said the autoit executable works fine when it is not called by a login script...

I read this over and over and could not be sure of the persmissions of the person logged in when it ran successfully:

When I run the Batch file while logged it the process completes successfully. WHen I run it while logging in I recieve the following error:

Sorry, I don't know what else to try.

I don't understand this part of the error:

\\docstar\setup\Test1.exe

\\docstar\SETUP\SETUP.exe

given the code posted...

...I'm sure that others can help you out...

[size="1"][font="Arial"].[u].[/u][/font][/size]

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
  • Recently Browsing   0 members

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