how to resume installation after restarting pc in c# in Setup and Deployment project?
Create a registry entry indicating where your installer left off.
Make an entry in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce with your installer name and location.
Your installer will be run after the PC reboots.
Read the registry entry and continue your installation.
Related
i have a problem with during application installation to client. My application is Microsoft office add-in. And then i try to deploy this application to the client i don't see this files on client side but software centre says that application was successfully installed.
Why it happen? I try to install another applications for example 7Zip.MSI, my own application .msi and anothers, all ok, but if i try to install Microsoft office add-in the files are somewhere disappeared. for script execute i used this command:
msiexec /i "WToysSetup.msi" /qb
i have already installed microsoft word on clients machine.
There are a number of possible issues here. I'm assuming you're using a Visual Studio setup project in the absence of a specific tool being mentioned.
The install requires elevation, but in a silent install Windows won't show the UAC elevation dialog, and it will run without elevation. Most installs like this would fail, but you might find that a Visual Studio generated MSI reverted to a Just me install, and installed the files to an unexpected location (often C:\ and not Program Files).
MSIs can be published or assigned with SCCM-type deployments, one is to the system the other to the user, and that's Everyone or Just me again, so it may have done a per user install because of that.
Regardless of whether it seems to have worked, if it requires elevation and fails then it may just fail silently, which would be one reason you can't find the files. You should be able to see in Programs&Features/Apps whether it is actually installed, but it was installed as a per user/Just me install you'd need to log on as that user to see it in the list of installed apps.
Sometimes AutoCAD 2009 spoils own menu files and some settings. At this case I recover the application state through the deleting its registry key in HKCU and its folders in the current user profile. Now I am to install necessary components (they recreate the registry key in HKCU and folders). For this purpose I programmatically launch the application. But I want to kill the process when the necessary components will be installed complettely during the application starting (because AutoCAD launching takes many time).
If I kill the acad.exe process, then the components installing will be killed too. I dont need such behaviour.
Is it possible to define (programmatically, I use C#) the moment when the installing of these components was finished? Or maybe it is possible to define that some components of the application are not installed on the current user profile still and then to force the launching of these components installing without the application launching (I don't know how to do it).
If you delete files or registry entries from the installed product, it's a feature of Windows Installer that it repairs the install at certain trigger points, one of which is using an advertised shortcut. If you don't want that application to actually run and want only the repair, then an alternative is to go to Programs and Features, select the product and Repair it. Or right click the MSI file and choose repair.
I have publish my current project. I got the publish folder in my Project's folder. I installed my program and it works perfectly, but I need to know if it is possible that after installation (installer is from the Visual Studio 2012 when you publish the project) the program will start automatically upon windows start up.
You could have the installer create a link to your application in the Windows Registry, under the Run or RunOnce registry keys for Windows.
Here is more information about the Run and RunOnce registry keys:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa376977(v=vs.85).aspx
In Visual Studio 2010 I have a c# windows application created and a setup deployment project.
Under configuration manager, the app is targeted at x86 but I cannot choose what the setup project targets as there is no dropdown available for this.
In the setup deployment project, I right click - view - registry and create the following . .
Under HKLM/Software/Manufacturer
I add Microsoft, then under that I add Windows, then under that I add CurrentVersion, then under that I add Run, so I end up with HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run.
Inside run I add a new string value for my app and set its value to "[TARGETDIR]my_app.exe" /R
This all compiles fine, when I run the installer on a target machine, it installs the Application but the registry entry does not get written. I have tried installing my Application on windows 7 32-bit and 64-bit, neither gets the key created. In regedit, the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run exists and I can navigate to it but my entry is not there. I can create it manually so why can't the installer do it?
All I want is to set this key on any target machine no matter what the target is - 32-bit or 64 bit, XP, or Vista or Win7/8
I am just wondering if it is possible to run a small code just once when the application is installing.
I would like to create a registry with the installation path. The reason why I need that because I have a windows service in my application as well, which install path always changes to system32.
I have an ini file which is created in the installation folder at installation. I need to reach that file with my service and windows form as well.
You don't need any extra code, just create a registry key in HKLM\software\yoursoftware-here with a key name like Installpath and a value of [INSTALLDIR] in your install, then reference that key in your service.
This assumes you are using a basic MSI project in install shield.