Jump to content
Sign in to follow this  
NYCPackager

RunAsSet on Windows XP

Recommended Posts

NYCPackager

Hello All,

I'm new here and new to AutoIt. I've been searching and searching and went through like 8 to 10 pages of posts on here looking for a solution to this problem but it seems either i'm blind or i just can't seem to find a solution to it. Here is my problem, and most likely you've all heard it before...

I have a very simple code...here is the code:

DirCopy("\\Server1\Application", "C:\Application", 1)

RunAsSet("UserName", "DomainName", "Password", 0)

RunWait("C:\Application\Setup.exe /v/qn.", @TempDir)

RunAsSet()

This simple code works PERFECTLY on Windows 2000 but it blows up on Windows XP SP2. Gives me an error of this:

Line -1:

Error: Unable to execute the external program.

Access is denied.

Now to give you more info. The user that i am using is a Domain Admin, Has access to the Directory as well as the Working Directory. The Secondary Logon Service IS STARTED. I have also used the Options portion of the RunAsSet to 0, 1, and 2 and it still gives me the same error. The workstation is joined to the Domain and the Domain Admins have Full Administrator Rights. hhmm, what else? i've also tried to use the Local Administrator as the user in the RunAsSet and it still blows up.

Please ANYONE...if you can solve this problem for me, i'll bow in front of my PC chanting your name 15 times!! LOL...

Thanks all in advance....

Share this post


Link to post
Share on other sites
weaponx

Maybe???

$localDir = "C:\Application"
DirCopy("\\Server1\Application",$localDir , 1)
RunAsSet("UserName", "DomainName", "Password", 0)
RunWait($localDir & "\Setup.exe /v/qn", $localDir)
;Restore permissions
RunAsSet()

Is there supposed to be a "." after /qn ????

Edited by weaponx

Share this post


Link to post
Share on other sites
NYCPackager

Maybe???

$localDir = "C:\Application"
DirCopy("\\Server1\Application",$localDir , 1)
RunAsSet("UserName", "DomainName", "Password", 0)
RunWait($localDir & "\Setup.exe /v/qn", $localDir)
;Restore permissions
RunAsSet()

Is there supposed to be a "." after /qn ????

yeah, there is supposed to be a "." after the /qn...

and that didn't work either...

Share this post


Link to post
Share on other sites
schilbiz

I ran this:

DirCopy("\\server\files\temp", "C:\tempApp", 1)
RunAsSet("localadmin", "domain", "password", 0)
RunWait("C:\tempApp\executable.exe /v/qn.", @TempDir)
RunAsSet()

It worked great, I would just double check the path name you are trying to copy and that everything is spelled correct.

I am using Win Xp SP2 as well.

Edited by schilbiz

Share this post


Link to post
Share on other sites
NYCPackager

I ran this:

DirCopy("\\server\files\temp", "C:\tempApp", 1)
RunAsSet("localadmin", "domain", "password", 0)
RunWait("C:\tempApp\executable.exe /v/qn.", @TempDir)
RunAsSet()

It worked great, I would just double check the path name you are trying to copy and that everything is spelled correct.

I am using Win Xp SP2 as well.

Everything is honky dory on the spelling and location...i've double check...i've checked to see if the files are being copied down correctly, and everything...this is the same script that i am running on Windows 2000. It's just really odd...

hhmm, if it is working for your workstation, then something's Gotta be wrong on mine...but i even did a brand new fresh install of Windows XP with SP2 and it is still blowing up...something's gotta be off a bit....<_<

Share this post


Link to post
Share on other sites
NYCPackager

LOL, ok, i found out the problem...what a moron i was.

Ok, solution to this problem was this...

I am using ZenWorks to deploy this application and Script. I have made it so that the ZenWorks would deploy this app using a System User account. Apparently this account doesn't have certain access rights, and it was fighting the AutoIt script for control. After i turned off the System User and made it to launch it using a Normal User Account, it installed fine.

Thank you All for helping me out...and i will definitely come back here for more information.

Thanks again...

NYCPackager...

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  

×