Windows 8 NetScheduleJobAdd The request is not supported - windows

Application uses API functions like: NetScheduleJobAdd, NetScheduleJobEnum, NetScheduleJobGetInfo.
Looks like those functions do not work with Windows 8 Jobs.
On creating new job getting error: "The request is not supported" (error ERROR_NOT_SUPPORTED)
AT.exe also does not work in Windows 8. Display the same error.
Documentation quite poor about AT command and Windows 8.
Can somebody explain why mentioned above functions do not work in Windows 8.
Is there any other approaches?
Maybe it is connected with changes in Task Scheduler Architecture in Windows 8?

The documentation for Win32_ScheduledJob says:
The Win32_ScheduledJob class is internally using the AT protocol, which is bound to deprecation starting with Windows 8 and Windows Server 2012. As a first step the AT protocol is disabled by default.
To turn the protocol back on, add the following registry entry:
Key: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\Configuration
Name: EnableAt
Type: REG_DWORD
Value: 1

Related

Windows Process Activation Service (WAS) will not start

IIS 10 will not restart on my PC. When I navigate to localhost, I get a 'localhost refused to connect' message. After looking through the event viewer, it turns out that the issue is that the Windows Process Activation Service (WAS) will not start.
The error message given is:
'The Windows Process Activation Service (WAS) encountered an error while handling key generation. This will prevent WAS from starting corrently. The data field contains the error number.'
When I try to start the service manually from the services app, I get the following:
Has anyone experienced this issue before? Any help would be greatly appreciated, I've been trawling the internet for several days trying to find a solution to no avail.
We've run into this issue several times after recent Windows Updates. In all cases, the following worked (got from a Microsoft support rep):
Run the following from an admin Powershell prompt:
reg delete HKLM\SYSTEM\CurrentControlSet\Services\WAS\Parameters /v GenerateKeys /f
net start w3svc
The keys will be regenerated, then the IIS AppPools can be started
According to your error message, WAS can not access the machine key when start up. Usually, machine keys are used to encrypt sensitive information in config file, WAS will not be able to start if there is no machine key to use.
The easiest and most common method is to try to uninstall and reinstall WAS.
If it still can not start, try to delete the registry entry NanoSet with cmd.
If the above two methods are useless, you can refer to this to delete machine keys, let WAS create new one while starting.
If somebody is still fighting with this issue, please check Event Viewer under System filter and check for any logs related to WAS. In my case I found the following entry:
The Windows Process Activation Service (WAS) encountered an error while handling key generation. This will prevent WAS from starting currently. The data field contains the error number.
So I just started again CNG Key Isolation service and everything is working now.

CANalyzer CAPL: determine if bus sleep (no messages on bus)

I am using CANalyzer 7.0 and an trying to figure out how to determine in CAPL if the CAN bus has gone to sleep (no more messages being sent). How can I do this?
I tried to read BusLoad using sysGetVariableInt() but it always returned zero. Perhaps I had the wrong namespace/variable name. Where can I find all system variables?
Edit - I've tried this:
BusLoad = sysGetVariableInt("_Statistics", "CAN1::Busload");
I've also tried changing the namespace but not sure where to find list of system namespaces.
Accessing statistics via system variables was introduced with CANalyzer/CANoe version 8.0.
As your are using version 7.0, try the following:
BusLoad = canGetBusLoad(1);
Starting from version 7.1, you would use:
BusLoad = CAN1.BusLoad;
From 8.0 onwards, you can use the systemvariables as in your initial question.
To answer your second question, you can get a list of all system variables from the Symbol Explorer.

IM Client Integration with Outlook

I am trying to understand the procedure of Integration the IM Client with Outlook 2010. The below link is used for this :-
https://msdn.microsoft.com/en-us/library/office/jj900715.aspx
Outlook is able to reach the CreateInstance method of my implementation.
If I have the Lync Client installed than the controls reaches till GetInterfaceMethod, in which I am returning the object of ILyncClient.
There is no progress after this. Following error is showed in the outlook debugs :
MsoIMProviderFactory--HrEnsureDefaultIMAppRegKeys Succeeded opening reg key (HKCU-SOFTWARE\IM Providers)
CMsoIMProviderFactory--HrEnsureDefaultIMAppRegKeys Succeeded querying reg key (HKCU-SOFTWARE\IM Providers-DefaultIMApp-IMapp)
CMsoIMProviderFactory--HrEnsureDefaultIMProcessRegKey Succeeded opening reg key (HKCU-SOFTWARE\IM Providers\IMapp)
CMsoIMProviderFactory--HrEnsureDefaultIMProcessRegKey Succeeded opening reg key (HKLM-SOFTWARE\IM Providers\IMapp)
CMsoIMProviderFactory--WhichMessengerInProcessList Using (IMapp) process name for search
CMsoIMProviderFactory--WhichMessengerInProcessList Using (IMapp) process name for search
Guys please give your feedback regarding the same ?????
If I don’t have Lync Client Installed than control never reaches to Authentication Method.
A. Do we need to implement the IMessenger interface also ?
B. If yes then please show some pointers on how to do that ?
Any pointers to resolve this would be helpful.
For building the COM server we are using out of process COM example(CSExeCOMServer). I had tried the same setup with outlook 2013 also. In this too the output remains the same.
Environment :-
Windows 7 Service Pack1 .
Outlook 2010 & 2013.
You would always need Lync installed in you machine since the interfaces which you used in your code are defined by Lync. If you want to remove this dependency then you will have to register your typelibrary (.tlb) in the system. To generate .tlb you need an .idl file which you can explore on net how to get.
If you want to be an IM Provider then you need not implement this IMessenger interface. But if you want to work in Legacy provider way you will have to implement this interfaces(this i had not tried).
And to resolve your issue I would need the code snippet as how you are defining the LyncClient class. Once you share that then I would try to help you.
I was able to make this work in both outlook 2010 & 2013 but then I used C# way of implementing the COM Server.

how to generate websphere thread dump without wsadmin on windows server

I have websphere application server v 7 over windows server and I want to generate thread dumps because i have thread hungs, but when I try to get the java cores with wsadmin appears an error, so I want to generate java core files like linux using kill -3 .
Is there something like this in Windows server ?.
Like ObiWanKenobi mentioned, your best bet would probably be through the deployment manager administrative console. From IBM's support site:
Set the com.ibm.websphere.threadmonitor.dump.java property to true:
Application Servers:
From the administrative console, click Servers > Application Servers > server_name.
Under Server Infrastructure, click Administration > Custom Properties.
Click New and add the following property:
Name: com.ibm.websphere.threadmonitor.dump.java
Value: true
Click Apply.
Click OK and save the configuration changes.
Restart the Application Server for the changes to take effect.
Node Agent:
From the administrative console, click System Administration > Node Agents > nodeagent.
Under Additional Properties, click Administration Services
Under Additional Properties, click Custom Properties
Click New and add the following property:
Name: com.ibm.websphere.threadmonitor.dump.java
Value: true
Click Apply.
Click OK and save the configuration changes.
Restart the Node Agent for the changes to take effect.
In short, there is no good answer.
The closest would be to use something like SendSignal. See the Can I send a ctrl-C (SIGINT) to an application on Windows? question for more information. Unfortunately, SendSignal doesn't work reliably on all versions of Windows (see my Send ctrl-break to java process on 64-bit Windows ala sendsignal on 32-bit question).
If you're willing to write some custom code, you could write a Java program that uses the attach API to load a Java agent that calls the Dump API. (I suspect that IBM Support Assistant has this capability built-in, but it's been too long since I tried to be authoritative on this point.)
You can make the JVM to do a thread dump when there are 'hung' threads messages in the SystemOut.log:
Add com.ibm.websphere.threadmonitor.dump.java=true under JVM's Administration > Custom Properties.

Powerhsell v2 crashing on launch

I have PowerShell v2 installed on a windows XP SP3 machine and when I went to open PowerShell today it said:
The shell cannot be started. A failure occurred during initialization:
Object reference not set to an instance of an object.
The event in the Powershell event log is:
Soruce: Powershell
Category: engine health
Event ID: 103
Settings: Object reference not set to an instance of an object.
Details:
ExceptionClass=NullReferenceException
ErrorCategory=
ErrorId=
ErrorMessage=Object reference not set to an instance of an object.
Severity=Error
SequenceNumber=
HostName=ConsoleHost
HostVersion=2.0
HostId=0fba5d45-885f-4f19-a354-4b390d5605bd
EngineVersion=2.0
RunspaceId=db9879d6-247a-40d7-9bfe-5bfd07a973f0
PipelineId=
CommandName=
CommandType=
ScriptName=
CommandPath=
CommandLine=
Any idea what would cause this? it seems to randomly start.
This forum post seems to suggest a missing registry key in your profile.
Excerpts from the discussion
After analyzing the Process Monitor log again, I find this error occurred if the following Registry key was missing:
HKEY_CURRENT_USER\Environment
Eventually the user rebuilt his local profile.
I have also seen success with people running the following command in powershell
Set-ExecutionPolicy RemoteSigned

Resources