This is the suggested way to add a logon script to a local user in Windows. http://technet.microsoft.com/en-us/library/cc770908.aspx
I also found the following : http://technet.microsoft.com/en-us/library/cc771314.aspx
Is it possible to add a logon script to a user through Local Users and Groups tab in Computer Management using powershell?
I am able to copy the script file to the location -\%COMPUTERNAME%\C$\Users\%username%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup' and it runs successfully. But in the local user properties I am not able to set the value of the attribute 'Logon script' to the desired value.