This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Trouble Deleting Folder in Vista
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 14, 2008
11:28 AM
Trouble Deleting Folder in Vista
Hello all,
I'm new here. I haven't had the time to scour the Forum to see if this question has been addressed before, so forgive me if that's the case.
My Goal: I am using InstallShield 2009 Professional to build an MSI to install PowerShell on Vista computers. After the install, we want the MSI to delete this folder:
Steps I'm taking: In the Installation Designer, under Additional tools, I'm using the Direct Editor to modify the Directory Table to include a new directory called "PowerShellStart" that points to the folder I want deleted. Here is that syntax:
I am then using the RemoveFile Table to delete that folder with the following syntax:
...to delete the files, and then also...
...to delete the folder itself.
Problem The MSI is installing PowerShell just fine, however it is not deleting the folder, or it's contents. I am not sure which variable to use for Vista to understand what I'm trying to delete - "StartMenuFolder" or "ProgramMenuFolder." I'm also not sure if the syntax is correct.
Any assistance would be awesomely appreciated!
Thanks,
Zach Parker
I'm new here. I haven't had the time to scour the Forum to see if this question has been addressed before, so forgive me if that's the case.
My Goal: I am using InstallShield 2009 Professional to build an MSI to install PowerShell on Vista computers. After the install, we want the MSI to delete this folder:
"C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows PowerShell 1.0"
Steps I'm taking: In the Installation Designer, under Additional tools, I'm using the Direct Editor to modify the Directory Table to include a new directory called "PowerShellStart" that points to the folder I want deleted. Here is that syntax:
Directory = PowerShellStart
Directory_Parent = ProgramMenuFolder
DefaultDir = Window~1|Windows PowerShell 1.0
ISDescription =
ISAttributes = 0
ISFolderName =
Directory_Parent = ProgramMenuFolder
DefaultDir = Window~1|Windows PowerShell 1.0
ISDescription =
ISAttributes = 0
ISFolderName =
I am then using the RemoveFile Table to delete that folder with the following syntax:
FileKey = PSFileRemoval
Component_ = Component_
FileName = *.*
DirProperty = PowerShellStart
InstallMode = 1
Component_ = Component_
FileName = *.*
DirProperty = PowerShellStart
InstallMode = 1
...to delete the files, and then also...
FileKey = PSFolderRemoval
Component_ = Component_
FileName =
DirProperty = PowerShellStart
InstallMode = 1
Component_ = Component_
FileName =
DirProperty = PowerShellStart
InstallMode = 1
...to delete the folder itself.
Problem The MSI is installing PowerShell just fine, however it is not deleting the folder, or it's contents. I am not sure which variable to use for Vista to understand what I'm trying to delete - "StartMenuFolder" or "ProgramMenuFolder." I'm also not sure if the syntax is correct.
Any assistance would be awesomely appreciated!
Thanks,
Zach Parker
(7) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 15, 2008
02:13 PM
Perhaps this forum isn't the correct place to ask this question, or else it is not visited very frequently.
Otherwise, I can't believe no one knows the answer to this question.
Any help out there? Anyone tried to do things in Vista?
:confused:
Otherwise, I can't believe no one knows the answer to this question.
Any help out there? Anyone tried to do things in Vista?
:confused:
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 15, 2008
02:46 PM
Does the directory not get removed if you use the Shortcuts view to define the shortcut?
Also, creating an MSI log file during uninstallation can provide some data explaining why Windows Installer does and doesn't add or remove installed data.
Also, creating an MSI log file during uninstallation can provide some data explaining why Windows Installer does and doesn't add or remove installed data.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 15, 2008
04:47 PM
I'm not having trouble during uninstallation of PowerShell, I'm having trouble performing an action to delete that folder after INSTALLING PowerShell. I hope we're on the same page. If so, please clarify what you're asking.
Thanks,
Zach
Thanks,
Zach
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 15, 2008
05:22 PM
If you're modifying or transforming the MSI that installs PowerShell, could you just remove that from the installer instead of deleting it after the fact?
Otherwise, I'm not sure I understand the relationship between your MSI and the PowerShell MSI; but as a sanity check, you'll want to verify that you have a real component name in the Component_ field of the RemoveFile records, since the file removal is tied to the installation of the component you pick there.
Otherwise, I'm not sure I understand the relationship between your MSI and the PowerShell MSI; but as a sanity check, you'll want to verify that you have a real component name in the Component_ field of the RemoveFile records, since the file removal is tied to the installation of the component you pick there.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 15, 2008
06:43 PM
The PowerShell installer is actually an MSU file, and not an MSI. I cannot modify it as it is. What I'm doing is performing the install of the PowerShell MSU and then after the fact, trying to have the MSI that I'm building around the MSU install delete the folder it creates in the Start Menu, so users cannot access the PowerShell shortcut.
That is a good point about the Component name. When I was working with the Acresso trainer on building this package, he had it set to Component_. I wasn't sure why, nor did I know what to change it to.
That is a good point about the Component name. When I was working with the Acresso trainer on building this package, he had it set to Component_. I wasn't sure why, nor did I know what to change it to.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 22, 2008
12:45 PM
*shameless bump*
Any more helpful insight into this problem that still exists for me?
Any more helpful insight into this problem that still exists for me?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 22, 2008
02:39 PM
Oh, with the "wasn't" and "did", I thought the problem was resolved... The Component_ value is just the default value InstallShield puts in the field of the same name in the RemoveFile table; perhaps select some component in your MSI package that will always be installed, ensuring that RemoveFile record takes effect?