windows-server-2008-r2

Start-Process -wait doesn't work when script is launched from command prompt opened with runas or as a scheduled task

最后都变了- 提交于 2019-12-01 03:25:21
I've got a script that's I want to run as a scheduled task, but it's not doing the thing it's supposed to. I'm trying to call an executable with Start-Process and the -Wait switch before continuing. Line is Start-Process -FilePath "C:\Pfx Engagement\Admin\Utilities\Backup Restore\BackupRestoreUtil.exe" -ArgumentList "/f "$backup_directory "" -Wait If I call it from a command prompt, ie: powershell .\script.ps1 it works. It runs the command and waits for it to finish before moving on. There's more to the script that has to be run after that command is finished. The problem is that when it's a

pg_upgrade on Windows cannot write to log file pg_upgrade_internal.log

↘锁芯ラ 提交于 2019-12-01 03:21:44
问题 I'm trying to run pg_upgrade on Windows 2008R2, but I'm getting the error: cannot write to log file pg_upgrade_internal.log Failure, exiting I saw a similar question for Linux at 23216734 which explains that the issue is with permissions, but it doesn't help with Windows as I do not have a user named postgres Same goes for the pg_upgrade docs, which mention a postgres user: RUNAS /USER:postgres "CMD.EXE" But again, I do not have such a user, and am trying to run this command as Administrator

WIC CreateDecoderFromStream returning 0x88982F50 post server migration

僤鯓⒐⒋嵵緔 提交于 2019-11-30 23:39:31
I have a thumbnail generation routine that I created using WIC for a .NET app. It has been working fine for the past year, but we just migrated to a new server. Old Server was W2k8 R2 Enterprise SP1 New Server is W2k8 Standard SP1 Here's the code that is failing Public Sub New(ByVal PictureData As Byte()) Me.WICFactory = New WICImagingFactory() Dim InputStream As IWICStream = WICFactory.CreateStream() InputStream.InitializeFromMemory(PictureData, PictureData.Length) InputDecoder = WICFactory.CreateDecoderFromStream(InputStream, Nothing, WICDecodeOptions.WICDecodeMetadataCacheOnDemand) '^=====

Java runtime.exec does not execute correctly

陌路散爱 提交于 2019-11-30 20:45:32
问题 I am getting an exe-File, which I have to execute using Java (Version 6) on Windows Server 2008 R2. Now there is s problem I do not really understand. When executing the file with the commandline "C:\test.exe param1 param2" it works correctly, but when I execute the file with Process proc = Runtime.getRuntime().exec("C:\\test.exe param1 param2"); proc.waitFor(); I can see the test.exe in the windows task manager and it starts running (it creates a log which states that), but then it simply

WIC CreateDecoderFromStream returning 0x88982F50 post server migration

£可爱£侵袭症+ 提交于 2019-11-30 18:09:14
问题 I have a thumbnail generation routine that I created using WIC for a .NET app. It has been working fine for the past year, but we just migrated to a new server. Old Server was W2k8 R2 Enterprise SP1 New Server is W2k8 Standard SP1 Here's the code that is failing Public Sub New(ByVal PictureData As Byte()) Me.WICFactory = New WICImagingFactory() Dim InputStream As IWICStream = WICFactory.CreateStream() InputStream.InitializeFromMemory(PictureData, PictureData.Length) InputDecoder = WICFactory

Set-Service: Cannot stop service because it is dependent on other services

只愿长相守 提交于 2019-11-30 17:52:47
问题 When I run the following command: Set-Service -ComputerName appserver -Name MyService -Status Stopped I get an error message: Set-Service : Cannot stop service 'My Service (MyService)' because it is dependent on other services. At line:1 char:12 + Set-Service <<<< -ComputerName appserver -Name MyService -Status Stopped + CategoryInfo : InvalidOperation: (System.ServiceProcess.ServiceController:ServiceController) [Set-Service], ServiceCommandException + FullyQualifiedErrorId :

Error # 1045 - Cannot Log in to MySQL server -> phpmyadmin

你说的曾经没有我的故事 提交于 2019-11-30 15:00:55
问题 We have installed PHPMyAdmin on a windows machine running IIS 7.0. We are able to connect to MySQL using command-line, But we are not able to connect using PHPMyAdmin. The error displayed is: Error #1045 Cannot log in to the MySQL server. Can somebody please help? PHP Version 5.4.0 mysqlnd 5.0.10 - 20111026 - $Revision: 323634 $ phpMyAdmin-3.5.4-rc1-all-languages.7z EDIT : I followed the link below with no success, mean i changed that password but phpmyadmin still has that error... C.5.4.1.1.

What happens on an application pool reset?

穿精又带淫゛_ 提交于 2019-11-30 13:12:57
问题 What happens when an application pool is recycled in IIS 7? Does IIS abruptly stops everything on that website and there is user impact or does it does it transparently and the user never notices anything? Should we do recycles at all? What are the pros and cons of it? I was thinking of doing it everyday late at night when traffic is very low. Any best practices, suggestions? Thank you 回答1: If you actually mean Application Pool Recycle, then it is an online operation. A new w3wp process is

Error # 1045 - Cannot Log in to MySQL server -> phpmyadmin

元气小坏坏 提交于 2019-11-30 12:29:40
We have installed PHPMyAdmin on a windows machine running IIS 7.0. We are able to connect to MySQL using command-line, But we are not able to connect using PHPMyAdmin. The error displayed is: Error #1045 Cannot log in to the MySQL server. Can somebody please help? PHP Version 5.4.0 mysqlnd 5.0.10 - 20111026 - $Revision: 323634 $ phpMyAdmin-3.5.4-rc1-all-languages.7z EDIT : I followed the link below with no success, mean i changed that password but phpmyadmin still has that error... C.5.4.1.1. Resetting the Root Password: Windows Systems Also there is thread like below in stack with no help :

How to detect antivirus on Windows Server 2008 in C#?

与世无争的帅哥 提交于 2019-11-30 06:30:31
I have seen code samples similar to the following numerous times in my search for an answer: using System; using System.Text; using System.Management; namespace ConsoleApplication1 { class Program { public static bool AntivirusInstalled() { string wmipathstr = @"\\" + Environment.MachineName + @"\root\SecurityCenter"; try { ManagementObjectSearcher searcher = new ManagementObjectSearcher(wmipathstr, "SELECT * FROM AntivirusProduct"); ManagementObjectCollection instances = searcher.Get(); return instances.Count > 0; } catch (Exception e) { Console.WriteLine(e.Message); } return false; } public