GreenWitch Posted July 28, 2009 Share Posted July 28, 2009 I'm a newbie in forum and autoit scripting. I'm trying to run the script, but getting errors: #NoTrayIcon RunAsSet("admin id", "domain name", "password") $DFTUSER = StringReplace(@DesktopCommonDir, 'All Users\Desktop', 'Default User') FileCopy("\\servername\dir1\dir2\dir3\filename", $DFTUser & '\Desktop\'); RunAsSet() Later I came to know that RunAsSet is no longer autoit function, so I used RunAs, but didn't work. Could you please help me what should I use instead of RunAsSet? Thank you. Link to comment Share on other sites More sharing options...
GreenWitch Posted July 28, 2009 Author Share Posted July 28, 2009 Hello, The following script is runinng, but don't copy, how to debug the program? Could you please share your experience? #NoTrayIcon Local $sUserName="username" Local $sPassword="password" Local $sServerLoc="\\servername\dir1\dir2\filename.txt" Local $sServerDes="C:\dir3\dir4\" RunAs($sUserName, @ComputerName, $sPassword, 0, @ComSpec, @SystemDir) $DFTUSER = StringReplace(@DesktopCommonDir, 'All Users\Desktop', 'Default User') FileCopy($sServerLoc, $DFTUser & $sServerDes) ; Any response is appreciated. Link to comment Share on other sites More sharing options...
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