Jump to content

Recommended Posts

Posted

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.

Posted

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.

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
×
×
  • Create New...