VB Script Deleting 2 folders
Hey Guys,
i made a custom action to delete 2 folders under c:\program file that is laid by the msi. When i delete the package manually my custom action works but when i push it through the SMS it doesn't work. This is how my VB script looks like in the custom action.
Dim objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFolder("C:\Program Files\Test1 2007")
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFolder("C:\Program Files\Test2 2007")
i made a custom action to delete 2 folders under c:\program file that is laid by the msi. When i delete the package manually my custom action works but when i push it through the SMS it doesn't work. This is how my VB script looks like in the custom action.
Dim objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFolder("C:\Program Files\Test1 2007")
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFolder("C:\Program Files\Test2 2007")
0 Comments
[ + ] Show comments
Answers (6)
Please log in to answer
Posted by:
gmorgan618
17 years ago
Posted by:
anonymous_9363
17 years ago
If it works 'manually', it should work in deployment.
- Are you logging the install? If so, has the Custom Action run?
- Where is your CA running, i.e. in which sequence?
On a point of order...you don't need to create the objFSO object again:
Dim objFSO
Const strFolder1 = "C:\Program Files\Test1 2007"
Const strFolder2 = "C:\Program Files\Test2 2007"
Set objFSO = CreateObject("Scripting.FileSystemObject")
With objFSO
If .FolderExists(strFolder1) Then
.DeleteFolder(strFolder1)
End If
If .FolderExists(strFolder2) Then
.DeleteFolder(strFolder2)
End If
End With
Set objFSO = Nothing
- Are you logging the install? If so, has the Custom Action run?
- Where is your CA running, i.e. in which sequence?
On a point of order...you don't need to create the objFSO object again:
Dim objFSO
Const strFolder1 = "C:\Program Files\Test1 2007"
Const strFolder2 = "C:\Program Files\Test2 2007"
Set objFSO = CreateObject("Scripting.FileSystemObject")
With objFSO
If .FolderExists(strFolder1) Then
.DeleteFolder(strFolder1)
End If
If .FolderExists(strFolder2) Then
.DeleteFolder(strFolder2)
End If
End With
Set objFSO = Nothing
Posted by:
chichora2003
17 years ago
Posted by:
chichora2003
17 years ago
Posted by:
matrixtushar
17 years ago
Posted by:
chichora2003
17 years ago
The following sections describe how to use record mode on Windows.
Using Record Mode
To record a new response file:
At the command prompt, use the cd command to change to the directory that contains the OUI executable file (setup.exe) for your installation.
Enter the following command:
setup -record -destinationFile <response_file_name> (on Windows)
Replace the <response_file_name> with the complete path for the new response file. For example:
setup -record -destinationFile C:\response_files\install_oracle910 (on Windows)
Use the OUI user interface to select your installation options. These will be recorded.
When OUI displays the Summary page, you can either continue with the installation or exit.
OUI saves your new response file using the path and file name you specified on the command line.
Using Record Mode
To record a new response file:
At the command prompt, use the cd command to change to the directory that contains the OUI executable file (setup.exe) for your installation.
Enter the following command:
setup -record -destinationFile <response_file_name> (on Windows)
Replace the <response_file_name> with the complete path for the new response file. For example:
setup -record -destinationFile C:\response_files\install_oracle910 (on Windows)
Use the OUI user interface to select your installation options. These will be recorded.
When OUI displays the Summary page, you can either continue with the installation or exit.
OUI saves your new response file using the path and file name you specified on the command line.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.