swightman
11 years agoNew Contributor
Losing local folder permissions after copying to remote system
When running this script locally on Win7 it works fine, however when I run it via TestComplete on a remote Win7 system I lose the permissions on the original folder.
The script:
function GetCalibrationData()
{
var myObject = new ActiveXObject("Scripting.FileSystemObject");
var myFolder = myObject.GetFolder("c:\\Data\\Data");
myFolder.Copy("c:\\", true);
}
After calling that script within a master script in TestComplete the C:\Data\Data folder is copied to the remote system and the (source) c:\Data folder loses all permissions, I have to take ownership and find there are no accounts listed in permissions. I can run that same script via TestComplete multiple times on different remote systems, yet when I attempt to run a subsequent script that points to C:\\Data\\One instead of C:\\Data\\Data it fails because of those missing permissions. I'm unable to determine how or why the folder permissions are disappearing, any help would be greatly appreciated.
The script:
function GetCalibrationData()
{
var myObject = new ActiveXObject("Scripting.FileSystemObject");
var myFolder = myObject.GetFolder("c:\\Data\\Data");
myFolder.Copy("c:\\", true);
}
After calling that script within a master script in TestComplete the C:\Data\Data folder is copied to the remote system and the (source) c:\Data folder loses all permissions, I have to take ownership and find there are no accounts listed in permissions. I can run that same script via TestComplete multiple times on different remote systems, yet when I attempt to run a subsequent script that points to C:\\Data\\One instead of C:\\Data\\Data it fails because of those missing permissions. I'm unable to determine how or why the folder permissions are disappearing, any help would be greatly appreciated.