NSIS faulty installation location - nsis

I am loosing my mind trying to get my way around why my setup behaves differently on the target device
Nsis version: 3.04
My machine: Win 10 64bit Build 17763
Client machine: Win 10 32bit Build 10586
We have no control the client machine because they are for schools and we have to make the app work exactly on them devices like on our laptops no matter what.
InstallDir "$LOCALAPPDATA\Programs\OurApp
on our machine this makes the setup install to
C:\users\username\local\appdata\programs\OurApp
but on the client machine it installs to
C:\Program Files (x86)\OurApp
I certainly can't understand why this keeps happening. The instructions to us that the data should not be accessible easily to the user except through the app we are building using .net. Then when the app is uninstalled it should clear the data it created. This only works when the app is installed in appdata location.
Any hints on why this is happening?

The initial investigation should be; is $Instdir set to the correct path inside the installer?
If you could write $Instdir to a log file on the client's machine that should help to narrow it down.
A common source of incorrect $Instdir is using InstallDirRegKey in combination with a existing older (possibly partial) install in a undesired directory.
If $Instdir is still c:\users... in your Section then you need to look at Windows, not NSIS. Tell them to look at the file properties of the installer .exe. Does it have any compatibility options applied? Do they have other compatibility shims applied through group policy?
It might also be helpful if they could run Process Monitor and send you a pml log file. That should reveal if a install dir is read from the registry and the actual paths passed to the kernel when it creates files and directories.
Finally, make sure you have RequestExecutionLevel user in your script to avoid UAC interference.

Related

Error installing tizen studio on windows 10

No matter which of the three tizen studio 2.0 installers I try they all don't work as they won't accept any path. The CLI installer gives the most detailed description:
** The directory you specify is not allowed to install the Tizen Studio. Some tools of the Tizen Studio will not properly work in the directory with administrator privilege or read-only access rights for your account.=> path
I have tried starting the installer with admin rights and owning the destination folders. Additionally, I switched from JDK 9 to 8.
Still, there seems no way to get the installer running. Any ideas what the reason could be? Thanks!
I managed to install tizen studio and the SDK using the %appdata% path.
If anyone else has the problem, try e.g.
C:\Users\YourName\AppData\Roaming\Samsung\tizen-studio
This is definitely a flaw Samsung should take care of!
I've successfully installed the IDE version with the following method:
Download Tizen Studio Web IDE installer
Open installer with 7-zip archive manager
You should find tizen-sdk.zip archive
Open it and extract it into the C:\tizen-studio folder
Create C:\tizen-studio-data folder
Create sdk.info file inside C:\tizen-studio folder
Put following lines into this file
TIZEN_SDK_INSTALLED_PATH=C:\tizen-studio
TIZEN_SDK_DATA_PATH=C:\tizen-studio-data
You can download packages with C:\tizen-studio\package-manager\package-manager.exe
You can start IDE from C:\tizen-studio\ide\TizenStudio.exe
This worked for me, hope this helps...
#Henry was almost correct and his scenario works on CLI/IDE installers.
And here are actual restrictions on Win10x64 tizen-studio 2.0 installation I've found:
pointed SDK location needs to be in your user directory. For example:
C:\Users\MrSmith\Tizen\tizen-studio
Data location could be anywhere, but in case of CLI installation, it will be near SDK folder.
CLI installation actually does unzip only and all further system configuration needs to be done manually. So, if you need only CLI, you could unzip "web-cli_Tizen_Studio_2.0_windows-64.exe" with 7zip or any other proper archiver where you want and do further manual configuration. (See here https://developer.tizen.org/development/tizen-studio/web-tools/cli)
Probably, if you login under Administrator you will be able to install SDK anywhere. Just "Run as administrator" doesn't work, at least for me.
My system params:
Win10 Pro x64
Oracle JDK 1.8.0_152
Have a fan ;)
I solved this problem that way:
create folder (eg Tizen_Studio)
inside created folder create new (tizen_studio and tizen_studio_data)
add all permissions for that folders for your windows account user
select folders in installation proccess
Enjoy!
The regular way which Samsung provides is working for me:
Make sure you have enough disk space (Tizen Studio needs about 700 MB
on Win10)
Create an empty folder with 2 empty subfolders (e.g. Tizen_IDE->studio (subfolder #1) -> data (subfolder #2)
The important part on Windows 10 is to navigate to YOUR users directory:
For example your user name is Bob. Go to C:\ -> Users -> Bob.
Then create there the empty folder "Tizen_Studio" with the 2 mentioned subfolders.
Check with right-clicking on the Tizen_Studio folder -> Properties -> Security if your Username (here Bob) is listed in groups and users. Click on your profile there in the security tab and look if the folder has full access rights inside the checkboxes (btw this should be automatically set if you choose the right described environment).
Now in the installer dialog you can choose the studio folder for the ide/sdk and the data folder for the installing data request path.
Thats it! Just important to install it inside your username folder!
I had this problem as well (on my Windows 8.1 machine), and ended up using the previous version of Tizen Studio Installer (version 1.3)
https://download.tizen.org/sdk/Installer/tizen-studio_1.3/
It even does not work for me in %APP_DATA% and also not running the installer with Administrative privileges.
But I finally found a solution which worked for me:
Create a new and folder somewhere
disable all inherit privileges on this folder
grant explicit all privileges for your users to this folder
remove all other privileges, especially these for Administrator
Use this folder for Installation
Write useful sofware for tizen ;-)
How bout removing 32 bit Java client and installing 64 bit on win 10?
Worked for me, no one seemed to notice that Installer opened in 7zip has an installer.jar which needs to be run with java client.
Thanks for the advises on opening installer with 7zip.

Conversion to x64 platform in visual studio failing

So I built a huge website for my company using the AnyCpu option. I didn't think it would matter - I have a 64bit machine with x64 windows, it's getting deployed to a x64 server, and there's no attached dll's, so it should just all be in 64, right?
Well, in the process of trying to implement some security, the company's support told us the application MUST be strictly x64. I figured it was, but to humor them, I went into the configuration manager, and changed all the target cpu, platform etc settings to x64.
Unfortunately now, it breaks when I hit f5 to run it. I've run into this before, I think, and I vaguely remember needing to delete some temp internet files somewhere, but I tried closing VS, deleting the bin folder, deleting the root folder from /framework/tempASPfiles... but I still get the BadImageFormatException - "an attempt was made to load the program with an incorrect format."
What's the best and fastest way to convert an app to x64? and am I right in thinking I need to delete some files somewhere?

How to create ProgramData folder with InstallShield?

Using InstallShield LE with Visual Studio 2013, dev and target machines are Windows 7.
How do I create a folder under ProgramData and place a file in it? I have a text configuration file that I need to put there so the user can edit it as needed.
[I know this isn't a forum for ranting, so use your imagination to insert some nasty non-family-friendly comments about InstallShield here.]
InstallShield is a Windows Installer authoring tool. InstallShield rants aside, let's talk about the Windows Installer pain of what you are trying to do.
Installing per-user components is a pain. It requires a repair in each user context to populate the file. It's very ugly and has issues such as source resolution.
There is an easier way. Install a "seed" of the file in [ProgramFiles]Company\Product or [CommmonAppData]Company\Product and when the user runs your program copy the file to the users ProgramData if it does not exist.
This way you keep it simple for the installer, only add a few lines of code to your startup and don't have to worry about MSI trying to "fix" the user config file when the user edits the content because the installer doesn't know anything about it.
Easy, heh? Application design and Installer design have to go hand in hand.

Install errors in InstallShield 2008 Premier Edition

I have a setup which has been created using InstallScript MSI project type. This problem is encountered by our client and he wants a quick solution.
Let's assume I have initiated the installation from a path like
C:\Setup_V_1.0.0931.1
Inside this folder I have Setup.exe through which I will install the product. After installation or after some days pass I will change the path to:
C:\New\Setup_V_1.0.0931.1
and this time I want to modify the setup. Actually we are supporting 3 features: Server, Client and Service.
This time I want only Client and not Server. So I will click on the Setup.exe or click on Uninstallation Icon in the Startup Menu which will lead to Maintenance Mode there you have an option to Modify, Repair or Remove. I choose Modify and select the feature, but as the installation progresses, this error message will pop up:
Setup could not find a file on the specified path or Disk. Please check
that the proper disk is inserted or specify a new path. Unable to
locate file c:\New\Setup_V_1.0.0931.1\setup.msi
Then, another popup will be shown saying:
Error: 1706. No Valid Source could be found for product. The Windows
Installer cannot continue.
The next error message is:
Error: 1603. Fatal error during installation. Consult Windows Installer
Help (Msi.chm) or MSDN for more information.
But if I change the path to its original location, it works fine.
How can I solve this?
I event checked in this registry path:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\{Product-Key}
This key contains a lot of information inside InstallProperties. There is a key called InstallSource and its value is C:\Setup_V_1.0.3909.1\. Even after changing this value installshiled is still showing errors.
I found the same registry information for Uninstallation Information:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{Product-Key}
In your properties change ReinstallMode (or maybe Reinstall I forget which) from omus to vomus
the v means cache your install, so it will put your .msi file in c:\windows\installer so it can be used later.
When installing a MSI, Windows Installer saves the original MSI path in registry (the InstallSource entry you mentioned). When running the MSI in maintenance mode, Windows Installer will use this path to find the installation data (CAB files).
When you move the MSI, the path stored in registry is no longer valid, so Windows Installer cannot find the installation data.
A possible solution is to use "Add or Remove Programs" or "Programs and Features" in Control Panel to modify the installation. This way the cached MSI is used.

How to run MSVC++ 6.0 off a USB drive as a portable app

Without using any third party program to do this (i.e. without VMware ThinApp, U3 or MojoPac etc.) How to move MSVC++ 6.0 from from its install on C: over to a USB drive? So that it can be used on different PCs with no admin rights and without installing anything on the host PC? Even if it's only usable as a console application would be fine, although to have the GUI including Visual Assist etc. would be even better.
Move the two folders that install created under c:\program files\ to the USB drive (e.g. to e:\progs\msvc\msvc6 and e:\progs\msvc\vc98), and append to the file e:\progs\msvc\vc98\bin\vcvars32.bat to suit e.g.
prompt $g
set path=e:\progs\uedit;e:\progs\utl;%PATH%
e:
cd e:\work
start e:\progs\uedit\uedit32.exe /i=e:\progs\uedit\uedit32.ini
cmd /k
Using a shortcut to vcvars32.bat then works fine for doing any simple console programming, which is all I’m using it for so far. I don’t know how well any of the GUI type programs in the tools folder will function.
I am not sure exactly how one would do that.
Here are a few ideas.
The installation procedure creates at least two sets of directories, so you could direct both of them onto the usb drive.
The installation procedure creates a bat file, that sets up the environment variables correctly for command line execution. Modifying it to point to the correct drive letter when your memory stick loads on the other machine may be important.
There are also registry entries for vc 6. Extracting them, and having a script of some sort to load them onto your target machine when needed, might be useful.
Is there a specific reason why vc 6 is required? Would another compiler do?
I haven't done this, but it should "just" be a matter of:
Copying all the application files to a USB drive. Remember there will be shared files and stuff that may need to go into the Windows directory.
Identifying and copying all of the registry entries, although you may need to be admin to create some of these on the target machine.
That's a heck of a lot of work, for little gain in my opinion. I think there may be a command line only version of the Visual C++ tool chain that may better suit your requirements. IIRC it was released to help people create build bots for open source projects, like the Mozilla Tinderbox, and includes the VC++ 7.0 compiler.

Resources