I'm looking for a guide for write a update mechanism for Windows 7.
I currently have a software wich 2.exe files. The first one looks for a webservice and if a update is there loads it as tempfile and runs the other exe. the other one overrides the main exe with the update and starts the new version. Could I do this without running both in Administration mode?
You would have to run the updating program as a service.
Related
Can someone tell me how to properly install this program to run with admin privileges at startup on Windows 10 using WiX?
All the help I've seen via Google has been old ones saying to use the Startup folder. Now, although the Startup folder still seems to work, I don't think it's the preferred way to do it anymore.
I also need think the need to run as admin adds a wrinkle in the process.
I can see few ways to do it:
Set registry values using WIX:
in this case you should add your app install path to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run (x86) or HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run (x64). Problem is to get windows version. I guess it's possible to do by WIX (using few RegistryKey elements with condition) but I haven't tried.
Use custom action to set registry values: the same as previous, but using C#. Also in this case it will be easy to determine windows version and add your app to the right key.
Using custom actions and Task Scheduler. For example you can use this library to add task to run after startup.
Run cmd using WIX to set up Task Scheduler (or via custom actions). The same as previous but without any libs.
A program requesting or requiring admin is a function of the EXE not WiX. The EXE should be manifested to request elevation.
MSFT has said it is not a best practice to have things in startup request admin. It's a horrible user experience.
The better approach is to do what you said you do in your comment. Have a component running as a service that the non-priv UI can communicate with.
I want to automate a job in my windows server,Can any one please share some idea or initiation for this scenario?
I like to connect from my windows server to another windows server and download the oracle database table in .csv format and place in my system folder.And this job should run every day.
Basically, i'm into UNIX platform but i want to do this in WINDOWS platform, Thank you for your support!!
You need to create a small application to do that, you can use ASP.NET to build the application, or PHP, but the latter will require more effort to setup the environment. After the application built, you will have to create windows task scheduler to execute the application at a specified time.
I have an executable application setup.exe for Windows that I realized with Launch4j/Inno Setup based on Java.
I often frequently release new versions and bug fixes.
I would like to know if there is a mechanism to install updates automatically?
Inno Setup does not have any built-in mechanism for implementing automatic updates.
You need to implement that yourself:
Make your application check for new versions (against your application webpage?). E.g. on startup (on a background thread?)
If the application detects a new version, make it download an installer to a temporary location.
Make the application execute the downloaded installer. You can make the installer run in silent mode (/silent switch). The application should close itself, to unlock any files it is using, to allow files update.
This approach will need the update installer to prompt for Administrator privileges. If you need the update to proceed completely seamlessly, you will have to implement a service. For that, see Deploying application with .NET framework without admin privileges.
I am trying to install my Metro Application.
So, my question is:
Can I move sample pictures for my Application to KnownFolders.Pictures and Videos during installation ?
And, how can I create installation file for my application?
Thank you
With the installation mechanism for Windows Store apps in Windows 8, there is no need to write a setup or installation program. That will all be managed through the Windows Store once your app is published.
Since you can't write a setup program, to accomplish a similar goal, you can put some functionality in the app to execute when it's first run, then save a setting to indicate you've already performed the first run operations.
This would be where you would put your code for moving sample pictures.
However, your app will also need the appropriate permissions to access the KnownFolders location programmatically - check out this article for details. http://msdn.microsoft.com/en-us/library/windows/apps/Hh967755.aspx
It's also a good best practice to ask the user if it's OK to copy sample pictures to their Pictures library.
I have an Erlang application that is deployed on a server with Windows Server 2008.
The way I do this:
Copy application folder in Erlang lib directory.
Open command line (cmd). Execute erl.
Execute application:start(app_name) in Erlang shell.
Are there any better approaches to launch the application? How to make the application to launch on Windows startup?
I have no experience with Windows but...
`1. First of all, you might want to have a look to the concept of release in Erlang. Essentially,
When we have written one or more applications, we might want to create a complete system consisting of these applications and a subset of the Erlang/OTP applications. This is called a release.
`2. Then, you might want to create a script that contains something like:
erl -boot ch_rel-1
Where essentially you're starting Erlang/OTP using a boot script that you created above (just follow the instructions in the releases page)
`3. This article explains how to create startup scripts in Windows Server 2008 (not tested, just googled):
http://technet.microsoft.com/en-us/magazine/dd630947.aspx
Hope this helps. Nice question.
Perhaps rebar might help. It makes building an app skeleton and release quite easy. A nice tutorial is here.
After getting familiar with releases, take a look at manual pages (erl -man ) for start_erl and erlsrv. I used them to start embedded system ( http://www.erlang.org/doc/embedded/embedded_nt.html ) in windows 2003, hope it still works for you in windows 2008.
After creating service with erlsrv it is possible to manage it via standard windows command line and GUI tools, e.g. setting start mode and restart policy.
May be you could start just your application by supplying "-s app_name" as erl/start_erl additional flag, but I didn't try that, as I had to go long route with embedded system release. In that case make sure you have "start() -> application:start(?MODULE)." in your "app_name.erl".