Why admin privileges are required? - inno-setup

I'm logged-in as non-administrator account on Windows 2008 R2.
When I try to run the Inno-setup script under that account, I'm required to enter administrator password.
The problem is that later I can't debug that script, since it has references to {userappdata} variable, which means that during run-time it refers to administrator!
I wish not to be asked to provide administrator rights - not during debug nor during real installation. How to do that?
I prefer the application not to be installed by administrator. Respectively, files are installed to {app} (usually C:\Program Files (x86)) and {userappdata} only
How to prevent being asked to install it as administrator?
If I'd purchase a code-sign certificate for that application - would that solve that problem?
THANK YOU

There are tips already shared,
http://www.vincenzo.net/isxkb/index.php?title=Vista_considerations
If you can make your installer friendly to standard users, then the elevation can be removed. You might first set PrivilegesRequired=lowest and then see what breaks. After fixing the broken pieces, you should get such an installer.
Code signing will not stop elevation prompt, if your installer still requires elevation.

Installing anything to %PROGRAMFILES% (C:\Program Files or C:\Program Files (x86) in versions of Windows supporting UAC (and even Windows XP under a non-power user or administrator account) requires administrator rights. There's no way to work around that; the normal (non-administrator) user isn't supposed to install software to %PROGRAMFILES%.

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.

Can I sign the uninstaller for my program?

For reference, I am using InstallShield 2015 and the project is a Basic MSI.
I know the uninstaller is created automatically, what I do not like about it is how I'm always shown the "Do you want to allow the following program from an unknown publisher to make changes to this computer?" warning.
Is there a way to sign the uninstaller the same way I do with the program itself so that users don't need to see this warning?
Assuming Basic MSI and Windows 7, I don't know why you'd get this message.
In Windows NT/2K/XP/Vista, MSI stripped the storage out of an MSI and stored it in c:\windows\installer. This was for space considerations and it would resolve the full MSI if content was needed.
In Vista they added UAC and the complaint was uninstall would say unknown publisher because stripping the storage invalidated the cert.
In Windows 7 and beyond they cache the full MSI. So this shouldn't be an issue. A further examination of your environment and uninstall log file would be required to give a better answer.

Inno Setup does not popup UAC prompt on Windows XP with PrivilegesRequired=none

In Inno Setup I do PrivilegesRequired=none.
This setting should prompt the UAC, if the user has Administrative privileges.
On some computers of Windows XP the UAC doesn't get prompted even though the Administrator is logged in, I verified this by checking the IsAdminLoggedOn setting and I saw that it was set to True.
Why is this happening?
If IsAdminLoggedOn returns True, the installer is already running with Administrator privileges ("elevated").
Note that there's no privileges separation in Windows XP. If the user you are running the installer with is the Administrator, you always have Administrator privileges. There's no UAC prompt in Windows XP.
The only prompt you can get in Windows XP is "Run as" prompt that allows you to run an application/installer as a different user (usually the Administrator).
By using the (undocumented and deprecated) PrivilegesRequired=none, you actually tell Inno Setup explicitly not to elevate the installer, even when it is started not-elevated. That you usually get the UAC/Run As prompt anyway is solely because of Windows internal heuristics that detects that the .exe you are starting is an installer and will probably need to be run elevated.
For details, see my question Make Inno Setup installer request privileges elevation only when needed.

How to disable UAC programmatically to install a program by LE installshield for all users

I have an installation setup created by LE instalshield under VS2012. This setup.exe installs the application, registers some DLLs and activeX files and adds some registry entries as pointers to the location of an SQL server database. This application is to be run by all the users in a group policy created by the IT of their institution. The installation is done under the full administration privileges.
If the UAC of the win 7 is not fully lowered, some DLLs and OCXs are not registered (although the required registry keys are written in the MACHINE area of the registry without any problem!). So in order to avoid this I have to manually lower the UAC to its lowest level before running the Setup.exe. This solves the problem with the registration of DLLs.
But sometimes even though the installed program works for the installed login, it does not work for other logins within the same group/users. So how can I create a setup.exe under LEinstallshield that would 1) not require manual lowering of UAC, 2) install for all users under the same group policy?
Thank you for all your help.
You should be asking why your installer isn't compatible with UAC instead of asking how to disable UAC. If you are authoring a clean MSI using the registry tables (COM extraction) instead of using COM self-reg or other custom actions, it should just work.

How to make an Exe Run as admin

I have a small application whose exe has to be worked in windows server 2008.
But in Win Server 2k8 it works properly only if the Option Run as administrator is selected, even if the user have admin previlege.
By selecting the property of that file to always run as admin, in the compatiblity tab will solve the issue.
But i have to enable this property while it installs.
And I am building the installer in Installshield 2009.
My question is how to enable this property from the installsield.
How can I make the Exe alwas run as admin.
Any one pleeasse hellpp......
Thanks In Advance..
Jijesh.
If your exe always requires administrative privileges, you should build it with a manifest that specifies requireAdministrator. If it only requires administrative privileges sometimes, it should probably launch itself with ShellExecute using the verb "runas". In neither case should you rely on the shortcut option.

Resources