MyDocuments from current User, buildin variable in Wix? - deployment

i need to install some file to C:\Documents and Settings\currentUser\SomeFolder.
I can't find some buildin function/variable for it.
Can someone help/tell me the <DirectoryRef Id="TARGETDIR"> structure or the solution for my problem?
Thanks.

First, are you sure that you want to do this? You will get a behavior where each user who logs in and starts up your program will attempt to do a repair and ask for the original install if not found. Also when you uninstall you won't be able to clean up all the users profiles.
Many people prefer the "first run" pattern where you have the installer install to C:\Documents and Settings\All Users\ and when you run your program it copies the files to the current user profile if needed ( usually only if you are overriding something that is set for all users ).
Otherwise, here is a list of available directories in Windows Installer / WiX
System Folder Properties:
http://msdn.microsoft.com/en-us/library/aa370905(v=VS.85).aspx#system_folder_properties
You'll want to choose from AppDataFolder, LocalAppDataFolder and CommonAppDataFolder.

Related

Perforce CLI reconcile adds 'ghost' files to my working directory

Have a perplexing bug when I try to reconcile work through the CLI for perforce in that I get a large amount of files detected and added to the changelist whenever I run the command.
This happens regardless of where my current working directory is but the files always come from there, if my working directory is outside the project's root I get a 'Path {path} is not under client's root' error and they are not added, however if my working directory is under the project root they are detected and added as missing files.
I've tried numerous different combinations of the reconcile command, explicitly stating the port, user, client etc., setting up P4Config, using relative and absolute paths, changing the working directory - but I always get these ghost files.
Has anyone come across this before? Could this be a bug with P4 itself?
Edit: I finally fixed this by reinstalling P4V so I'm assuming this was some bug either my install of perforce or any local config files that would have been reset upon reinstall. For reference this is the page that finally fixed it https://community.perforce.com/s/article/15324
This is the result of the following bug:
https://www.perforce.com/perforce/doc.current/user/relnotes.txt
Bugs fixed in 2020.1 Patch 1 (2020.1/1991450)
...
#1964794 (Job #102470) *
'p4 reconcile'/'p4 status' might report about invalid filenames
of the form '//depot/0' or '//depot/100', etc. This is fixed.
Since this was fixed in a 2020.1 patch, it can be inferred that it only affects specific 2020.1 builds (i.e. those before the patch).
To fix it, make sure you're on a client version (p4 or P4V; this is not a server-side bug) whose changelist number is higher than 1964794. No special reinstallation procedure is needed; just download the latest binary/installer from Perforce's website.
Force a reinstall of P4V to fix this, details can be found here:
https://community.perforce.com/s/article/15324
Or if that page is taken down for any reason:
SOLUTION
Forcing a reinstall using the Windows msiexec installer utility with Windows msi installer file extracted from the p4vinst64.exe file can often successfully complete a full reinstall where running the P4V exe installer such as "p4vinst64.exe" fails
If not already downloaded, obtain the appropiate Windows installer for P4V (for example "p4vinst64.exe" for 64 bit Windows platforms). Currently these can be downloaded from https://www.perforce.com/downloads/helix-visual-client-p4v
Extract the msi from p4vinst64.exe; for example to extract it to "c:\p4v", open a Windows a cmd prompt and change directory to the location where p4vinst64.exe .is located and run the following command:
p4vinst64.exe /s /b"c:\p4v" /v"/qn"
Now from c:\p4v, run the following command to force a full reinstall:
msiexec /i "p4vinst64.msi" /qn REINSTALL=ALL REINSTALLMODE=vamus /L*v log.txt

AppSrv01 doesnt have write permission

i know that the default profile name when i installed websphere was Appsrv01, I want to create my own AppSrv02 but the location of my IBM Websphere was in C: and i dont have any write permission, i dont have any admin rights also..
using COMMAND-LINE, I want to make my profile folder to be writable, so that my newly created AppSrv02 will be list down in the profile names in my RAD.
Please help me. Thanks
So that's your problem. In order to have a usable profile in WAS, your user must have write permissions. See this link from WAS ND infocenter, it applies to WAS standalone too.
http://www.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.installation.nd.doc/ae/tpro_manage_nonroot.html
If you cannot change the write permissions to this profile, you'll need to create your own. For this, you can either use WAS Profile Management Tool, WAS CLI or you can create your profile using the Configure profiles... link in the WAS server creation wizard you posted. I'd use the RAD way because RAD validates, within the IDE, the proper permissions that you need to create and use the profile within RAD.
First check whether you have admin rights or not if your using User/Guest profile, by creating any new folder in C drive where IBM WAS is installed.
If you have Admin rights, than right click on RAD run as administrator. It should work fine.
If Profile doesnt show up in drop down, Configure new profile and try checking that way.
If you dont have Admin rights better install RAD in any local drive other than C
Running Eclipse with Admin rights and removing the read-only tick for the AppServXX folder/WAS folder couldn't help me... cause I copied the WAS server from another PC :). So for those of you who want to move / migrate your development environment:
I did a search inside the copied WAS, Eclipse and the project's workspace folder for their old paths (with Total Commander, feed the results into a list) and dragged all the files (except the log ones) into my editor (NotePad++) and did a replace in all open documents for the new paths. It's a bit lucrative, but it took only 10 minutes for me and afterwards the WAS server in Eclipse showed the correct profile and it also did start up well.

How to delete some files after msi installation is completed

I have a custom screen step displaying checkbox options for web.config specific to each environments (DEVINT, QA, Stage,Prod) as part of MSI installation.
Once the user selects QA as option then the web.qa.config file is renamed to web.config file
After the complete installation, I see that there are other web.config files ( web.DEVINT.config,web.stage.config,web.prod.config) still present in the folder.
I want to remove the other web.config files web.DEVINT.config,web.stage.config,web.prod.config
after the installation is completed.
Can anyone help me to resolve this issue.
Thanks & Regards,
Santosh Kumar Patro
A RadioBox would seem a better choice then a Checkbox since I would imagine the choices are mutually exclusive. Use the property associated with the control as conditions on the component so that only one of them gets installed.
Windows Installer will complain (ICE Valication) if multiple components install the same key path. What I do to get around this is to make the keys paths go to a subdirectory such as Configs\Web.LifeCycle.Config so that each is unique. Then I use the DuplicateFile table to clone that file to the real directory \ web.config path. The downside is I deploy a subdirectory/file that isn't needed but the upside is I can use it to quickly know what was picked and have a backup of the file to compare against in case someone goes and modifies the real web.config.
In limited scenarios I use AppSearch to autodetect the life cycle instead of showing a UI at all.

Is there a good reason why PowerShell uses the Documents folder as a default location for scripts?

Is there a good technical or other reason why the MS hard-coded the Documents folder as the default location for WindowsPowerShell? MS has been criticized for too much configuration over convention in the past (WCF?), but a case can be made for more configuration in PowerShell. I, and I presume most developers, like to keep their development work centralized in a separate folder or volume away from personal and system files.
For instance, if you install PoshGit, it will install itself in C:\Users\Your Name\WindowsPowerShell\Modules. I don't want it to install itself there but in my own development partition d:\Dev\PowerShellScripts. There's no environment variable that controls this location.
Is there a reason for this or I just don't get it?
Can you explain yourself a bit more.
According to my understanding PowerShell.exe interpreter base directory is the one defined by $env:HOMEDRIVE, $env:HOMEPATH, that can be change using the user profile.
As shown in the screen shots here under :
Edited :
Ok, the screenshot comes from the user property in Active Directory MMC, you've got a simplest one in your windows seven user properties. But this has nothing to do with your problem.
Your problem is around the module installation. The think that you have to know is that Modules can be installed quite everywhere (even on a shared directory with some tricks). By default the environnement variable $env:PSModulePath points to the paths where Get-Module -ListAvailable look for them. So you can add d:\Dev\PowerShellScripts\Modules in this path and then copy the subfolder of C:\Users\Your Name\WindowsPowerShell\Modules created by PoshGit inside your Modules directory and it should work. Modules as opposite to Snapins don't need to be registered.
Now the reason why PoshGit choose to put module in user profile, raser than let you choose the place is PoshGit installer problem.
For more explanations read about Modules and about_environment_variables.

how to execute and read from a command line during installation of installShield exe

I am new to Install Shield, and i have a really critical requirement. In between the installation steps, the installer should run a clearcase command in the backend and then that command output should be given as an input to the next installer panel.
To be more specific, i have to give the user to select a ClearCase storage location of his choice. For this, i need to run "cleartool lsstgloc" command in the back end. This command retrieves a list of available storage locations. I should read this list and show to user in the next panel, from where he can chose the storage location of his choice.
How is this possible using installshield. Please help me.
You could write a custom action to run your command and store the output to an MSI property. You could run the custom action when navigating from the first dialog to the second and use the property on the second dialog to present some kind of list.
Or how about if the command line to the installer be assigned an MSI property which is the path. For ex, create an installer property named CCPATH. Then whatever launches the installer include that as an arg:
SETUP.EXE CCPATH=E:\CCSTORE\CASE12...
The installer properties can be used within the setup process as needed.