public class tcUtilPSTools
extends java.lang.Object
Constructor and Description |
---|
tcUtilPSTools()
Creates a new tcUtilPSTools object.
|
tcUtilPSTools(java.lang.String admin,
java.lang.String adminPwd,
java.lang.String adminDomain,
java.lang.String compName)
Constructs tcUtilPSTools object with the following parameters
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
addUserToFolder(java.lang.String batchPath,
java.lang.String batchFileName,
java.lang.String sharePath,
java.lang.String user,
java.lang.String permissions)
Adds a user to have access to the directory (Security tab under folder
properties)
|
java.lang.String |
createDirectory(java.lang.String batchPath,
java.lang.String batchFileName,
java.lang.String newDir)
Creates a directory on the target machine
|
java.lang.String |
createShare(java.lang.String batchPath,
java.lang.String batchFileName,
java.lang.String shareName,
java.lang.String sharePath,
boolean hidden)
Creates a share on the target machine
|
java.lang.String |
deleteDirectory(java.lang.String batchPath,
java.lang.String batchFileName,
java.lang.String dir)
Deletes a directory on the target machine
|
java.lang.String |
deleteShare(java.lang.String batchPath,
java.lang.String batchFileName,
java.lang.String shareName)
Deletes a share on the target machine
|
static java.lang.String |
exec(java.lang.String command)
Executes the specified string command in a separate process
|
java.lang.String |
removeUserFromFolder(java.lang.String batchPath,
java.lang.String batchFileName,
java.lang.String sharePath,
java.lang.String user)
Removes a user from having access to the directory (Security tab under
folder properties)
|
java.lang.String |
renameDirectory(java.lang.String batchPath,
java.lang.String batchFileName,
java.lang.String existingDirPath,
java.lang.String newDirName)
Re-names an existing directory on the target machine RENAME
[drive:][path]filename1 filename2.
|
public tcUtilPSTools()
public tcUtilPSTools(java.lang.String admin, java.lang.String adminPwd, java.lang.String adminDomain, java.lang.String compName)
admin
- Administrator login to use to access remote machineadminPwd
- Administrator password to use with the login to access
remote machineadminDomain
- The domain under which the target computer iscompName
- Target computer namepublic java.lang.String createDirectory(java.lang.String batchPath, java.lang.String batchFileName, java.lang.String newDir)
batchPath
- The absolute path of the batch file(without the '\' at
the end) on local machine that is to be copied to target machine
and executed there.batchFileName
- The name of the batch FilenewDir
- The absolute path of the directory to be createdpublic java.lang.String deleteDirectory(java.lang.String batchPath, java.lang.String batchFileName, java.lang.String dir)
batchPath
- The absolute path of the batch file(without the '\' at
the end) on local machine that is to be copied to target machine
and executed there.batchFileName
- The name of the batch Filedir
- The absolute path of the directory to be deletedpublic java.lang.String renameDirectory(java.lang.String batchPath, java.lang.String batchFileName, java.lang.String existingDirPath, java.lang.String newDirName)
batchPath
- The absolute path of the batch file(without the '\' at
the end) on local machine that is to be copied to target machine
and executed there.batchFileName
- The name of the batch FileexistingDirPath
- The absolute path of the directory to be deleted,
ex: "c:\dirOld"newDirName
- The new directory name, ex: "dirNew"public java.lang.String createShare(java.lang.String batchPath, java.lang.String batchFileName, java.lang.String shareName, java.lang.String sharePath, boolean hidden)
batchPath
- The absolute path of the batch file(without the '\' at
the end) on local machine that is to be copied to target machine
and executed there.batchFileName
- The name of the batch FileshareName
- Share name of the sharing directorysharePath
- Absolute path of the sharing directoryhidden
- true is the share is hidden, false otherwisepublic java.lang.String deleteShare(java.lang.String batchPath, java.lang.String batchFileName, java.lang.String shareName)
batchPath
- The absolute path of the batch file(without the '\' at
the end) on local machine that is to be copied to target machine
and executed there.batchFileName
- The name of the batch FileshareName
- Share name (that is to be deleted) of the shared
directorypublic java.lang.String addUserToFolder(java.lang.String batchPath, java.lang.String batchFileName, java.lang.String sharePath, java.lang.String user, java.lang.String permissions)
batchPath
- The absolute path of the batch file(without the '\' at
the end) on local machine that is to be copied to target machine
and executed there.batchFileName
- The name of the batch FilesharePath
- The path of the directoryuser
- The user to add to the folder,... format: DOMAIN\User, Userpermissions
- The permissions to the folder of the user added,
(format: ":F", ":C", ... for Full Control, Change, ...
permissions)public java.lang.String removeUserFromFolder(java.lang.String batchPath, java.lang.String batchFileName, java.lang.String sharePath, java.lang.String user)
batchPath
- The absolute path of the batch file(without the '\' at
the end) on local machine that is to be copied to target machine
and executed there.batchFileName
- The name of the batch FilesharePath
- The path of the directoryuser
- The user to remove from the folder,... format: DOMAIN\User,
Userpublic static java.lang.String exec(java.lang.String command)
command
- command to execute