Jump to content

Recommended Posts

Posted (edited)

RunAsSet("login", "gs", "Pass")
Run("S:\kidpix4\setup.exe /s")

S drive is mapped when some one logs on. I am getting "The system cannot find the path specified". I tried taking the S out and just using the path but that didn't work either. I'm at a loss here. This is really my first autoit script and I got everything working except getting it to run as admin.

Edited by RediXe
Posted

Go to Setup.exe and right click: Properties...Look at Location: What EXACTLY Does It? Does It Say: "S:\kidpix4\" ?

Posted

Go to Setup.exe and right click: Properties...Look at Location: What EXACTLY Does It? Does It Say: "S:\kidpix4\" ?

It's different I just shortened it for posting. It works without the RunAsSet. The original path is this but figured the "S:\kidpix4\" would be easier to work with for troubleshooting this problem.

Run("S:\Tech-Fixes\Packages\kidpix4\setup.exe /s")

Posted

The user whose context you are using needs to have access to this S: drive. If you logged in as the "gs" user, would you be able to Run() that path?

Remember when you change user by using RunAsSet(), the current user's access no longer matters.

Lar.

f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Posted (edited)

The user whose context you are using needs to have access to this S: drive. If you logged in as the "gs" user, would you be able to Run() that path?

Remember when you change user by using RunAsSet(), the current user's access no longer matters.

Lar.

Batch File to run:
if exist "C:\Program Files\The Learning Company\Kid Pix Deluxe 4\KP.exe" goto :END
net use /delete s:
net use S: \\orion\wh
Call "S:\Tech-Fixes\Packages\kidpix4\tests.exe"
:END

tests.au3

RunAsSet("administrator", "gs", "******", 0)
Run("setup.exe", "\\orion\wh\Tech-Fixes\Packages\kidpix4\")
;Sleep("10000")
;Send ("{ENTER}")
;Sleep ("2000")
;Send ("{UP}")
;Sleep("2000")
;Send ("{ENTER}")
;Sleep("2000")
;Send("{ENTER}")
;Sleep ("2000")
;Send("{ENTER}")
WinWaitActive ("Register")
Sleep ("2000")
Send("{ESC}")
Sleep("2000")
WinWaitActive ("Install Halted")
Sleep ("2000")
WinClose("Install Halted")
Sleep("2000")
WinWaitActive ("Acrobat Reader 5.1 Setup")
Sleep ("2000")
WinClose("Acrobat Reader 5.1 Setup")
Sleep("2000")
WinWaitActive ("Exit Setup")
Sleep ("2000")
Send("y")
;WinWaitActive ("Kid Pix Deluxe 4 - InstallShield Wizard", "InstallShield Wizard Complete")
;Send ("{ENTER}")
RunAsSet()
Exit

I still having the same problems.

EDIT:

I see why this isn't going to work. Not sure how to delete the S: drive and remap it with autoIt after I use the RunAsSet

Edit 2:

RunAsSet("administrator", "gs", "7csz7n2k", 0)

DriveMapDel( "S:" )

DriveMapAdd( "S:", "\\orion\wh" )

Run("setup.exe /s", "S:\Tech-Fixes\Packages\kidpix4\")

Did not fix the issue. Yes I took the net use out of the batch file.

Edited by RediXe
Posted

try...

RunAsSet("Administrator","gs","****")
RunWait("cmd")

when the CMD prompt opens try doing the "Net Use" stuff in the RunAsSet users context...

what is left is to test different RunAsSet() options ... parameter 4...

Lar.

f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Posted

I usually use it like this...

RunAsSet("administrator", "gs", "******", 2)
Run("\\orion\wh\Tech-Fixes\Packages\kidpix4\setup.exe","\\orion\wh\Tech-Fixes\Packages\kidpix4")

I think... but it has been quite some time since I have needed to do this type of thing...

again... experiment with an open CMD to see what is possible.

Lar.

f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Posted

try...

RunAsSet("Administrator","gs","****")
RunWait("cmd")

when the CMD prompt opens try doing the "Net Use" stuff in the RunAsSet users context...

what is left is to test different RunAsSet() options ... parameter 4...

Lar.

"The directory name is invalid." I tried options 0,1,2 and nothing is working. Wasn't sure if you saw both the EDITS I did before you got your post off.

Posted

Who is this user you are trying to use? Are you able to use this user to log into the PC? For some reason it seems this user does not have access to network resources when logged in... I don't know... this seems specific to your domain or local setup.

Lar.

f_mrcleansmalm_77ce002.jpgAutoIt has helped make me wealthy

Posted (edited)

I usually use it like this...

RunAsSet("administrator", "gs", "******", 2)
Run("\\orion\wh\Tech-Fixes\Packages\kidpix4\setup.exe","\\orion\wh\Tech-Fixes\Packages\kidpix4")

I think... but it has been quite some time since I have needed to do this type of thing...

again... experiment with an open CMD to see what is possible.

Lar.

Changing the Run command to this fixed the issue. THANK YOU so much. Now just have to fix the end of the autoit script so it doesn't cancel the program install. :) Edited by RediXe

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