Wolfmorder Posted November 5, 2004 Posted November 5, 2004 Hi, I wanna run a small program looking like this : RunAsSet("username", @Computername, "password") RunWait ("\\server\path\application.exe","\\server\path") RunAsSet() Autoit is giving me an error message like this "Network name not found" (Traduce from french) Now if I'm changing the path to a local drive it work just fine but I wanna be able to run it from a server. Any idea ? Thx
SlimShady Posted November 5, 2004 Posted November 5, 2004 Paste the whole script and remove the password. Because it should work.
Wolfmorder Posted November 5, 2004 Author Posted November 5, 2004 This is the whole script I only do that and it's giving me that error. I've seen many other posts about this on this forum without a clear answer. Local it work but not on a Network...
SlimShady Posted November 5, 2004 Posted November 5, 2004 Can you browse to \\server\path using explorer? If you say no: add the IP and the server name to your hosts file if you say yes: sorry, I have no idea
Developers Jos Posted November 5, 2004 Developers Posted November 5, 2004 There has been several posts on this subject and it basically comes down to: After you do the RunAsSet the credentials change to the local account which very likely doesn't have any rights to the server share. So to go around this issue you first copy the file to the users local disk, then do the RunAsSet and run the local version of the program. Make sure you also change the WorkDir if you started the script from the server. 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.Â
Matt @ MPCS Posted November 5, 2004 Posted November 5, 2004 QUESTION (for those familiar with RunAsSet()): Running RunAsSet on a computer and then accessing a network application that does not allow the user on that computer to authenticate would also cause this, no? QUESTION (for Wolfmorder): Is network authentication done on the computer level or at the domain level? What do RunAsSet and RunWait return when calling them in your code? You need validate the output for those so you know what to do to fix the problem. You may also want to try replacing @Computername with @LogonDomain. I am not real versed in the workings of RunAsSet but knowing the MS security model these are all valid considerations. *** Matt @ MPCS
Developers Jos Posted November 5, 2004 Developers Posted November 5, 2004 (edited) QUESTION (for those familiar with RunAsSet()):Running RunAsSet on a computer and then accessing a network application that does not allow the user on that computer to authenticate would also cause this, no? <{POST_SNAPBACK}>What do you mean with "accessing a network application"? RunAsSet changes the credentials for the programs shelled by Run and RunWait, like RUNAS does.The returncode of runasset is not really important since runasset doesn't really do anything yet. it will only be 0 when the OS doesn't support it.There is in this case also no returncode for RunWait() since AutoIt stops with an error. you need the set Opt("RunErrorsFatal", 0) to get a returncode. Edited November 5, 2004 by JdeB 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.Â
Matt @ MPCS Posted November 5, 2004 Posted November 5, 2004 Sorry JdeB I missed the line about it erroring out in his original post. Forget my questions... the problem here is the network connection between the local PC and the PC on which you are running the app from is no good. Verify the path and it should work. Let's make sure I understand what I am talking about here. It sounds like the error is occurring on the RunWait line not the RunAsSet line if it cannot find the connection. Please verify. *** Matt @ MPCS
RocTx Posted November 5, 2004 Posted November 5, 2004 This runs well. I don't get any errors. I'm also using a domain level admin account. There are some programs that our users are not "allowed" to run and putting a script like this on a share helps. Code: ; Set the RunAs parameters to use Domain level adminstrator account RunAsSet("AdminId", "Domain", "Password") ; Admin = Administrator Domain = Domain name (NA - North America), Password = ;self explanatory ; Run IPINFO.exe program RunWait("\\KPAPPS\D$\Apps\IPINFO.exe",) ; Reset user's permissions RunAsSet() RocTx
stingjoel Posted November 6, 2004 Posted November 6, 2004 I think local computer with username: "username" must join domain to the server...so when you do RunAsSet, user at local computer will be changed into "username" and it will also connect to the server...so you can run application at server (if you have rights).. Sorry if you don't undertand my bad english.... :">
nobby Posted November 6, 2004 Posted November 6, 2004 If there is a domain account with the same name and password as a local account, credentials will be passed on from the local to the domain.eg. Local = Administrator with password 12345Domain = Administrator with password 12345RunAsSet("Administrator", @ComputerName, "12345")RunWait("\\Server\Share\path\executable", "\\server\share\path\")should run the same asRunAsSet("Administrator", @logonDomain, "12345")RunWait("\\Server\Share\path\executable", "\\server\share\path\")Must use share name as well as in Roctx example "\\KAPPS\D$\Apps..." CheersNobby
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now