Problems installing Wix#

Jun 19, 2015 at 1:35 PM

Currently I cannot work out how to install WiX#...

The install.cmd give either a 'Requested registry access is not allowed' error with MyComputer as the assembly that failed, and if I run it as administrator, it says that 'cscs' is not recognized as an internal or external command, operable program or batch file.

Any help would be greatly appreciated.
Jun 19, 2015 at 2:46 PM
You do need to run it as admin as install.cmd created en environment variable (writes to the registry). In fact this is all what this batch file does. However you need to run it from the location of the install.cmd and right-click "run as admin" doesn't do it. Thus you have to open the command prompt as admin and navigate to the location of the install.cmd.
Jun 19, 2015 at 2:51 PM
Even when opening Command Prompt as an administrator and navigating to install.cmd, I still get an error saying

'echo off
'cscs' is not recognized as an internal or external command, operable program or batch file.
Press any key to continue...
Jun 19, 2015 at 2:55 PM
Then try to modify the install.cmd to point to the cscs.exe, which is included into downloadables. And of course ensure cscs.exe is present.
Jun 19, 2015 at 3:04 PM
Adding the full path to cscs.exe worked thanks. Is there anything else I need to do once that has all ran?
Jun 19, 2015 at 3:09 PM
No. That is it. As I mentioned it is not really an installation but rather a configuration. Install.cmd only executes cscs.exe to create an environment variable and nothing else.
BTW, since you had PATH problems check that created WIXSHARP* envars have valid path assigned.
Jun 19, 2015 at 3:18 PM
One path is C drive, windows\system32

And the other is system32\wix_bin\bin which currently doesn't exist in system 32.

Should I move the Wix files into that folder?
Jun 19, 2015 at 11:22 PM
This is what uinstall.cmd does:
envVars.SetValue("WIXSHARP_WIXDIR", Path.Combine(Environment.CurrentDirectory, "Wix_bin\\bin"));
envVars.SetValue("WIXSHARP_DIR", Environment.CurrentDirectory);  
The paths are relative to the location of 'install.cmd' Thus the envars you have for some reason are set incorrectly.

However I would argue that you may just delete these envars all together if you have WiX installed. Wix# compiler is smart enough to lookup the installed WiX and only if not found then go to the location of the WIXSHARP_WIXDIR/WIXSHARP_DIR.