Windows service properties.settings.default location? - windows-7

I have built a Windows service app that's installed and running. During debugging while the service is running, I have found that when I import the properties.settings.default and modify it, it is not saved to the app.config file in my project folder. I could not find this app.config file in [user]/%appdata%/Local/ either..
Where does properties.settings.default.save() save to?
I'm running Windows 7 if that helps.

You will find the APPDATA folder for system accounts at:
C:\windows\system32\config\systemprofile
Or (for x86 apps on Win7 64):
C:\Windows\SysWOW64\config\systemprofile

Related

IIS on a virtual machine on a shared folder

I'm running Arch with a Windows 10 virtual machine and I'm trying to run an IIS server with an application in a shared folder. When I try to browse to it, I'm given a 500.19 error "cannot read configuration file". I know the application works under a normal Windows environment but I need the application to be in a shared folder under a virtual machine.
The shared folder is located in /home/hayden/virtual/shared.
What am I doing wrong?
Does IIS have permission to the folder? See this post on how to do that.

how to start VMWARE player 6 on Windows 7 from Windows .bat file

I want VMWARE to start automatically when I restart Windows 7.
So, I want the command line for this in a .bat file that my Windows startup can call.
I've just noticed you mentioned what VMware Application you're using in question's subject.
VMware Player is now VMware Workstation Player.
I can find no topics related to this in 6.0 version, so I don't think it's possible. Anyway, you may try doing the following:
Add vmplayer.exe to Startup Programs in start menu
Register a scheduled task "On Startup" for vmplayer.exe
Run vmplayer.exe from it's root folder via cmd, that would be something like
C:\Program Files (x86)\VMware\VMware Player\vmplayer.exe
If you're trying to start a virtual machine, you can do it by running the command above plus adding the "-x" parameter, as said just in Workstation Documentation, page 486.
I hope it helps!
There is a couple of bugs in the installer of VMWare player 6. You should swap these values in the Windows registry :
HKEY_CLASSES_ROOT\Applications\vmplayer.exe\shell\open
HKEY_CLASSES_ROOT\Applications\vmplayer.exe\shell\open\command
Then add this key :
HKEY_CLASSES_ROOT.vmx\OpenWithList\vmplayer.exe
Assuming your Virtual image is in C:\Users\stackoverflow\, your batch file should be similar to this :
start "" /low "C:\Program Files (x86)\VMware\VMware Workstation\vmplayer.exe" "C:\Users\stackoverflow\Win10.vmx"
Assuming the open verbs are correctly set in the registry (see #Doe Doe's post) you can just use:
start "path\to\my_vm.vmx"

SonarQube installation failing to start service

I'm installing sonarqube on Windows Server 2012.
I have followed the following steps:
Downloaded sonarqube4.4 and extracted to C:\Sonarqube
Downloaded Java JDK 1.7.0_60 and jre 1.7.0_67 as well as jre7
Installed Windows SDK 7 and .NET Framework 4
Navigated to C:\sonar\bin\windows x86-64 and ran StartSonar.bat as an administrator, this ran ok with no output and Ihad to hot ctrl- Z to break
I then ran \windows-x86-64\InstallNTService.bat as an administrator and I am seeing the sonarQube services was launched, but failed to start.
Not sure what the problem is.
I believe you first ran \windows-x86-64\InstallNTService.bat successfully and then StartSonar.bat unsuccessfully (the inverse order of what you describe).
You probably have [this problem]: http://qualilogy.com/fr/wp-content/uploads/sites/2/2013/09/Sonar_ServiceLaunchError2.jpg
Windows could not start the Sonar service on Local Computer.
Error 1067: The process terminated unexpectedly.
In that case, the solution is to change the user/rights to launch the Sonar service: https://qualilogy.com/en/migrate-sonarqube-tomcat-to-windows-service/
Go to the Services window, find the Sonar service, and open the Properties windows to change the user it logs on as to one with sufficient permissions.
I was able to solve this problem by creating a new folder named “Temp” in C:\Windows\System32\config\systemprofile\AppData\Local\
The Log-File will show only
--> Wrapper Started as Service
Cleaning or creating >temp directory C:\Program Files (x86)\SonarQube\sonarqube\temp
<-- Wrapper Stopped
The SonarQube service was launched, but failed to start.
After a long search, I came up to this site http://zen-and-art-of-programming.blogspot.de/2013/03/installing-and-running-sonar-source.html.
Solution:
Navigate to C:\Windows\system32\config\systemprofile\AppData\Local\ and create the directory Temp
2: Set the user rights to full access
3: Run the StartNTService.bat

How to change the IIS 7 application pool on a remote server?

I am looking to create new virtual directories on a remote server and set the app pool to a configuration other than the default. I am using NAnt but open to any other commands that can accompolish this.
Here is what I have tried:
<mkiisdir iisserver="${remote.server}" dirpath="${install.path}" vdirname="${vir.dir.name}" />
The above works fine in creating the VD to a remote server but the nant task does not have a parameter for specificing the application pool. Strange as to why not !!
I looked into using powershell to update the application pool since I already have the Virtual Directory created but due to my Windows OS restrictions I am unable to install the WebAdministration module which is required to update the IIS app pool.
Is there any existing method to accompolish this that I have not considered?
Thanks.
You can use AppCmd.exe which is located in the System32 folder.
appcmd set app /app.name:"Default Web Site/MyVirtualDirectoryName" /applicationPool:"MyAppPool"
If you need to Update the web applications directories on other servers remotely, then you can use PSExec \\RemoteServerHostname appcmd set app /app.name:"Default Web Site/MyVirtualDirectoryName" /applicationPool:"MyAppPool"

P2 self provisioning RCP vs. Windows UAC

We used to savor the joy that is a self updating Eclipse RCP application on Windows XP (it´s an company only internal document management system). Now after switching to Windows7 updates will only be performed if the application is run as an Administrator which of course erases the joy out of the thing that is a self updating application.
The self provisioning is more or less copy/paste from this article
Since the installation folder is bound to C:\Program Files (company policies...) the application may no longer write to this folder, unless started as an elevated process. What p2 does (at least I think after an epic debugging session) is to download artifact.xml and content.xml from the p2 repository to compare locally and build an update plan. Unfortunately if it is not able to store the downloaded files it simply says "Nothing to update".
I already tried to give the shared installation/bundlepool a try, in which the bundles are installed to the user directory using the p2 director application with the following properties:
-metadataRepository http://someserver/updatesite
-artifactRepository http://someserver/updatesite
-installIUs my.application.id
-roaming
-destination "C:\Program Files\MyApplication"
-bundlepool C:\Users\me\MyApplication
-profile DefaultProfile
-profileProperties org.eclipse.update.install.features=true
-p2.os win32
-p2.ws win32
-p2.arch x86_64
-Declipse.p2.data.area=C:\Users\me\.p2
The installer works kind of well and the application may start (after telling her, that the launcher is in my user directory). But unfortunately the self provisiong still doesn´t work this way. Run as administrator will result in downloaded updated bundles and features in the -destination location instead of the -bundlepool location - which is what I expected.
What switch did I miss?
We've had a similar problem here. One of the reasons may be that the IUs being installed still try to write something in the "C:\Program Files\MyApplication" via the p2.inf touchpoint instructions. The solution was to deploy a minimalistic launcher "C:\Program Files\MyApplicationLauncher" which:
performs bundle pool updates (dir = "C:\ProgramData\MyBundlePool")
and actually installs and launches the application in the %tmp% (dir = "C:\Users\username\AppData\Local\Temp\MyApplication")

Resources