.EXE in .CAB can not install from Win7, IE8 - c++

I have made a browser plugin and tried to deploy it from a .cab file in IE. And it's per-user install.
My problem is in Windows XP, The installation works well in different users. However, in Windows 7, when open the page including the .cab, the .cab file is downloaded and extracted, but when I click 'install' button, nothing happens.
Here's .inf file:
[version]
Signature="$CHICAGO$"
AdvancedINF=2.0
[Deployment]
InstallScope=user
[Setup Hooks]
hook1=hook1
[hook1]
run=%EXTRACT_DIR%\MyPlugin.exe
'MyPlugin.exe' is in the .cab file too.
Note that there's a [Deployment] segment in the code, I get it from MSDN, if delete this segment, it can install in Win7, but UAC popup and I need to enter admin password. But the browser plugin I made is for per-user, I think it should not need the admin privilege here.
UPDATE:
Now I find that IE doesn't request admin privilege only when browsing the page from intranet, otherwise, it will still request admin privilege if browsing from internet, so I doubt that IE will force using admin privilege to execute the hook to install .exe file.

If your %EXTRACT_DIR% is anywhere outside of \users\%user%\ or any subdirectories then it will require administrator password: ie. Programfiles.

You are probably not registering your plugin under HKEY_CURRENT_USER , for the deployment to work without the UAC popup popping out correctly on Windows 7. According to MSDN your plugin needs to be registered under HKEY_CURRENT_USER : On both Windows XP and Windows Vista, non-administrators are prevented from installing any ActiveX on their own. But now an **ActiveX registered under the HKEY_CURRENT_USER** hive is now fully supported by Internet Explorer within the context of a user's privilege level.

Related

What do I need to do to submit my desktop app to the Windows Store?

I heard that Windows 10 will allow developers to submit their desktop (non-Metro) apps to the Windows Store. I'm developing using C/C++/MFC and WinAPIs.
What do I need to do to submit my desktop app to the store? And what are the requirements/charge?
You should consider watching this //build talk with John Sheehan. It covers the details of Win32 apps in the store (codename Project Centennial). The first detail is "this project is still under development" (as of May 2015).
In a nutshell, you can take an existing MSI-based installed app, run it through a tool to generate an appx, and then you're done. There are some things that won't work (eg installing services, custom licensing / DRM, or running as administrator) but most normal app code will work. The example shown is Adobe PhotoShop Elements, which worked perfectly except for the licensing check (which can now be handled by the Store anyway).
If you don't want to sit through an hour of this Build 2015 presentation linked by Peter Torr, here's a synopsis of what Project Centennial will entail. Also, as was pointed out already, this is all a preliminary stuff, that is still under development (as of May 2015.)
Applies to Win32/.NET/COM based apps listed in a Windows 10 Store:
MSIs are "evil". Use APPX packages instead.
APPX Gloal: one-click installs thru Windows Store, automatic app updates via Windows Store (using file diff'ing - no need to re-download large unchanged files in the package.)
Microsoft will have an automatic conversion tool: MSI to APPX.
MSI licensing/DRM will not work: i.e. can't look up CPU serial number, hard drive info, network card MAC addr, etc. (My take: The store app will not be able to access hardware directly.)
The app will have a live tile & anything else that can be done with the Universal App (or Metro style app.)
The app's AppxManifest.xml file will define app's file associations.
The app installs into a sandbox folder with randomized path, example: C:\Program Files\WindowsApps\<GUID>\<Package Name>. This path changes every time a new app version is released.
The app's sandbox folder will have Root\VFS subfolder that will contain the following redirected subfolders:
AppData
AppVSystem32Catroot
AppVSystem32Catroot2
Common AppData
ProgramFilesCommonX64
ProgramFilesCommonX86
System
SystemX86
Windows
For instance, if your app tries to access C:\Windows it will be redirected to C:\Program Files\WindowsApps\<GUID>\<Package Name>\Root\VFS\Windows invisibly for the app.
The app's package sandbox folder will have Registry.dat file (that is a registry hive) for that app. All requests to the system registry done by your app will be redirected to that file, including HKLM and HKCU keys. So in other words, your app won't be able to modify any of the shared system registry keys.
Apps installed via APPX packages cannot share dependencies between their files, nor inter-load other app's package contents.
Namespace merging (between shared system files and package's Root\VFS folder files):
Namespace wrire redirection (writing into shared system registry is redirected into your app's Registry.dat file. Also on the file system scale only AppData folder is redirected to your app's Root\VFS\AppData folder):
The redirected AppData folder will be placed into non-roaming location.
The store app can run only as a user (which they refer to as a "Full Trust", which in my book is a misnomer) It cannot run elevated, and if it tries to call an API that shows UAC prompt, such API will silently fail.
The store app cannot install or run NT services.
I believe that there's a way to sign up for any updates on this project.

Sitecore icons corrupted on install

I'm getting the following error in the Sitecore editor when I go to Configure > Icons and attempt to click "More Icons":
Access to the path 'C:\inetpub\wwwroot\MyWebSite\temp\icons_Applications.html' is denied.
What would be the easiest way to sync the icons on the web site with the installation package, without having to start over and re-install the site?
It seems that perhaps the app pool of your IIS site doesn't have rights to create temp files which is where the icons are placed after you first open them. Sitecore uses the Website\temp\IconCache folder to store the icons. Make sure your app pool for the IIS site has the right privileges per the installation guide, in this case it looks like write access is not fully granted.
The default IIS App Pool identity would be either Network Service or ApplicationPoolIdentity. Make sure that user has write NTFS permission for the \Website root folder of your instance.

Storing user's application preferences in Terminal Services Server session. Managed C++

Sorry if my question is silly, but I have no experience at all with terminal server and am having a problem on how to store user preferences for an app.
The application was originally designed to run in individual, independent, computers. The installer has the option to install for all users or the current user but it always stores some xml in a subdirectory of the commonapp folder of the computer. It does store it here to be able to write to it later on under Windows vista upward.
Now, the company is running terminal server and the users don't have an independent computer anymore. They log into a session of terminal server and the administrator decides what software they can use. As the app is now, it installs in the server and offers all the users the same preferences from the commonapp. If the preferences are changed for an user, they all will have the change...
Please, could someone illustrate me on this? Initially, I though that by choosing 'to all users' when installing, the terminal server system would use the roaming folder of the user to store the preferences but I was wrong...
I don't know what users are going to use the app and cannot install directly to their folder either.
Is this a terminal server settings thing or do I have to write some code in the app that checks if the user has the xml in its folder and copy it and use it if it doesn’t?
Do not store application preferences in its directory. Instead, store it in user's roaming directory - use Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) (since you tagged the post as managed). Then it can be installed once, but run multiple times by multiple users and each of them will get his set of settings.

Active-X control fails to load in web page

I followed the instructions given in this link http://support.microsoft.com/kb/167158 for packing my ActiveX control. It works fine in my development machine. When it is accessed in some other machine it gives the following error "Windows Has blocked this software because it cant verify the publisher". I have used a test certificate to sign my control and the testing machine is Windows 7 with IE 9.
Problem Fixed:
I have to sign my .ocx file other than my cab file and build the control with MFC dlls statically linked. That helped me to fix the issue.
You have some options:
Sign the CAB
Add your site to trusted site or change your browser settings
Here some links about signing the CAB:
http://msdn.microsoft.com/en-us/library/ms537364(v=vs.85).aspx - Signing and Checking Code with Authenticode
http://www.top20toolbar.com/misc/codesigncert.htm - Article about how to sign ActiveX for free
you can also try to install the activeX with non-admin rights (Only for vista and Windows 7) http://msdn.microsoft.com/en-us/library/windows/desktop/aa369519(v=vs.85).aspx - Installing a Package with Elevated Privileges for a Non-Admin
What about Download unsigned ActiveX set to Enable:
if this is working then you need to check your sign and see it's ok,

Coldfusion 9 installation problem with IIS7

Windows web server 2008 R2 64 bit, CF9 64 bit, IIS7, ISAPI extensions and filters and II6 metabase compatability installed. OS is on C default, and trying to install CF to D:
Testing IIS and it shows index.html correctly from c:\inetpub\wwwroot at http://localhost/index.html
Then I install CF to D:\ , single standard server licence, select run with all IIS sites, select C:\inetpub\wwwroot as the web root for administrator, and when it gets to the bit where it is supposed to open up administrator to complete the installation it opens up the browser with a 500 error.
Now when I go back to http://localhost/index.html I also get a 500 error, if i uninstall CF I can again reach the html page.
CFIDE has been installed in C:\inetpub\wwwroot presumably correctly. Can anyone tell me where I'm going wrong please.
Update
The exact IIS error is
HTTP Error 500.0 - Internal Server Error
The page cannot be displayed because an internal server error has occurred.
Module IsapiModule
Notification ExecuteRequestHandler
Handler AboMapperCustom-28262
Error Code 0x800700c1
Requested URL http://127.0.0.1:80/test.htm
Physical Path C:\inetpub\wwwroot\test.htm
Logon Method Anonymous
Logon User Anonymous
Resolves as below
There is a setting Enable 32-Bit Applications under Application Pool>Advanced settings. Set this to True and you will gain access to your CFIDE>Administrator page.
I would suggest first trying a restart. It is one of those things that after the fact sounds so obvious, but you never think of it. I know I have had problems with installing CF under IIS and had to restart the server to get it running.
I'm humiliated to admit it, but the problem was that what I thought was the cf9 64 bit installer, was the 32 bit one.
# Dave and # CfSimplicity many thanks for your help and in particular the IIS user account stuff was new learning for me.
Try checking the file system permissions for this folder:
D:\ColdFusion9\runtime\lib\wsconfig
The account that IIS uses needs Read, Execute and Modify permissions on this folder and below.
It might be because of two problems.
1) you haven't installed CGI, ISAPI extensions and ISAPI filters aren't installed yet in Web Server (IIS) of Server manager.
Window 2008 R2 with Coldfusion
2) you need to enable 32 bit application at IIS7.
Internal 500 error CF9 on Window 2008
I tried a different approach with my Windows 7 Home Premium - See http://coldfusioner.blogspot.com/2011/12/fix-number-1-installing-64-bit.html
It seems that I was successful by using the IIS Connector batch scripts manually and then to create a second default web site after installing the handlers. My article link above shows the steps I took - a very raw article and will likely be refined as I hear from others how they adapted my approach. The important thing is that this worked ;>) I hope it helps others...
The problem could be that your Application Pool that is part of your default website. It is possible to set it to run 32 bit applications. Try setting the Enable32bit to false in the defaultapppool of your IIS server, restart the app pool and your www service itself. Then try to use the ColdFusion wsconfig tool to add the IIS mapping. It should work even without the cf 9 updater 1 being installed on the server.
​To avoid a 500 error when accessing the Administration console for the first time when installaing ColdFusion 9 on a Windows 2008 server with IIS 7.5 installed, include the "IIS_IUSRS" user group with "Full Control" to the \Lib\wsconfig folder in Enterprise server or \runtime\lib\wsconfig folder in Standard server. Before starting the ColdFusion install, make sure the "IIS 6 Management Compatibility" functions are installed, especially the "IIS 6 Metabase Compatibility" function.
Assuming that you use the default installation paths (C:\JRun4 for Enterprise or C:\ColdFusion9 for Standard), here is a step-by-step approach:
Begin the ColdFusion installer as an Administrator. At the completion of the initial installation process, but before accessing the online Administration console, do the following:
1.) At the Start Menu, select "Computer"
2.) In the Enterprise install, go to C:\JRun4\lib. For the Standard install, go to C:\ColdFusion9\runtime\lib.
3.) Right-click "wsconfig" and select "Properties" to open the wsconfig properties dialog box.
4.) Click the "Security" tab.
5.) Click "Edit" to change permissions for that folder.
6.) Click "Add..." to add a new user/group.
7.) Enter "IIS_IUSRS" in the Object name field and click OK to return to the Permissions dialog box.
8.) In the permissions dialog box, ensure that the "IIS_IUSRS" group is highlighted and click "Full Control" in the "Allow" column, then click "OK" to close the dialog box. Ensure that the permissions change will affect all files and folders under wsconfig.
9.) Click "OK" to close the wsconfig properties box.
Return to the ColdFusion installer wizard and continue the installation by clicking the open ColdFusion Administrator link. If the settings are correct, after a minute or two, a web browser with the ColdFusion Administrator Console should appear so you can complete the installation.