w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Windows 7 Group Policy Editor- shutdown batch file not executing
Simply putting the script in the folders you mentioned will not assign it as a shutdown or logoff script respectively. The folders are just the places where Windows is going to look for the respective script. You still need to assign it with a policy. Check with RSoP.msc if the policy is actually applied. How do you know that the script is not running at all (as opposed to script is running but fails to execute its task)? Do you see Userinit events 1000 and 1001 in the eventlog? Do you encounter the same issue regardless of whether you run the script as logoff or shutdown script? If the problem exists only when running the script as a shutdown script, it may be a permissions issue. Shutdown scripts are running as the user LOCAL SYSTEM, which by default doesn't have access to user profile

Categories : Windows

Python get info about group policy
Run command with administrator: secedit /export /cfg group-policy.inf /log export.log In python: os.system('secedit /export /cfg group-policy.inf /log export.log') All info will be exported to group-policy.inf file and then parse the file will get the info you want. See secedit command.

Categories : Python

AWS IAM group policy on S3 resource affecting other groups?
If you are sure this policy is only attached to the Collaborators groups than the Developers should not be effected. From your related question, it seems you originally tried a bucket policy. Do you still have a bucket policy applied that restricts the whole bucket to *.txt files? Try removing any existing bucket policy.

Categories : Amazon

AWS s3 bucket policy invalid group principal
It's not possible to use groups in Principal at the moment. See https://forums.aws.amazon.com/message.jspa?messageID=356160

Categories : Amazon

How to change Windows Server 2012 WSFC cluster group FailoverThreshold default value
http://technet.microsoft.com/en-us/library/hh710040.aspx I think you can change the always on value per the ms article

Categories : Sql Server

debug/run executable fails with: this program is blocked by group policy
I didn't see the answer for this particular issue, so I will post it here to save anybody in my situation some time. The issue seems to be with the name of the executable. Apparently Client.exe will get blocked. Perhaps someone with deeper knowledge can provide a better solution, but my solution was to rename the output executable. Hope this answer is helpful.

Categories : Windows

How to set Group Policy "Turn Off Automatic Root Certificates Update" vie Registry/Powershell?
Domain policies override local settings. That's how they're supposed to work (they'd be rather useless otherwise). If you want the policy disabled, disable or remove the policy in Group Policy Management or remove the computer from the domain.

Categories : Powershell

Windows Azure SQL Database CREATE LOGIN - Expiration policy?
Since the default value for CHECK_EXPIRATION is OFF and Windows Azure SQL Database does not support the CHECK_EXPIRATION option, no password expiration policy will be enforced.

Categories : Sql Server

How to change check in policy behaviour with tfs power tools 2012
You should be able to use the process editor included in power tools to make that change. Here is a blog post detailing several ways to make this change: Changing the default Check-In Option

Categories : Visual Studio 2012

Rails: Ignore specific gem on windows environment or create a :windows group
This can be done by specifying the platforms. Gems to be installed in Linux/Mac: platforms :ruby do gem 'railroady' end Gems to be installed in Windows: platforms :mingw do gem 'win32console' end To be sure about your Ruby installation in Windows, you can check out the RUBY_PLATFORM constant: ruby -e 'p RUBY_PLATFORM' Which in my case is "i386-mingw32".

Categories : Ruby On Rails

Programmatically obtain multicast group membership for a network device on OSX
I believe I have found the answer after a lot of searching. I finally found the source to Darwin's netstat, and it led me to this function. Type: man getifmaddrs Looks like it's the one. Also looks like it's the one for other BSDs. Here is some sample code: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/types.h> #include <sys/socket.h> #include <net/if_dl.h> #include <ifaddrs.h> int main(int argc,char **argv) { struct ifmaddrs *ifmap = (struct ifmaddrs *)0; struct ifmaddrs *p; char name[32]; unsigned char mac[6]; if (!getifmaddrs(&ifmap)) { p = ifmap; while (p) { if (p->ifma_addr->sa_family == AF_LINK) { struct sockaddr_dl *in = (struct sockaddr_dl

Categories : C

How does linux process scheduling policy relate to thread scheduling policy?
Linux does not support process scheduling at all. Scheduling is entirely on a thread basis. The sched_* functions incorrectly modify the thread scheduling parameters of the target thread id instead of the scheduling parameters of a process. See: http://sourceware.org/bugzilla/show_bug.cgi?id=14829 and http://sourceware.org/bugzilla/show_bug.cgi?id=15088

Categories : C

How do I programmatically set a permission to a windows service?
You are going to need to use PInvoke from c# to call to the Win32 libraries to be able to set permissions for a Windows service. It is a bit complicated if you have never done it before, but here is a good example of setting up a Windows service and its associated permissions: http://msdn.microsoft.com/en-us/library/windows/desktop/bb540474%28v=vs.85%29.aspx If you know C++, it might be a better idea to use that language, and put the Windows service code in a .dll that you call from C#. The example above will give you a good start and you should be able to customize what you need to do from there.

Categories : C#

hide tiles of Windows 8.1 in c# programmatically
Here: Works for me: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices; namespace Constants.UI { public class Taskbar { [DllImport("user32.dll")]// For Windows Mobile, replace user32.dll with coredll.dll private static extern IntPtr FindWindow(string lpClassName, string lpWindowName); [DllImport("user32.dll", SetLastError = true)] private static extern IntPtr FindWindowEx(IntPtr parentHandle, IntPtr childAfter, string className, string windowTitle); [DllImport("user32.dll")] private static extern int ShowWindow(int hwnd, int command); private const int SW_HIDE = 0; private const int SW_SHOW = 1; protected static int Handle {

Categories : C#

Is there any way to search windows store programmatically?
I've outlined this process in my blog. http://jasonthomascarter.blogspot.com/2013/08/the-friendly-developers-guide-to.html I have used this to create several Windows 8 apps using Windows Store Data. Developer Dashboard, Most Active Reviewers, Windows Store Developers, App Roulette etc... Here we go! First we will start with Robots.txt file for the Windows Store website. http://apps.microsoft.com/robots.txt Websites use robots.txt to guide web crawlers on how to behave, what they want them to see, and what they don't want them to see. http://www.robotstxt.org/ Web Robots (also known as Web Wanderers, Crawlers, or Spiders), are programs that traverse the Web automatically. Search engines such as Google use them to index the web content, spammers use them to scan for email addresses, and

Categories : Json

Programmatically edit the BCD store on Windows 8?
The only two ways of editing Windows BCD programmatically are: Scripting bcdedit (not a real programmatic approach) Using WMI BCD provider interface (special WMI functions and objects for BCD access) A BCD is stored in registry file format and the "system" BCD is mapped to HKLMBCD00000000. A BCD is a collection of objects (loaders/applications, settings, device objects). Editing of BCD objects is not possible in the general case when not using the above mentioned methods because the structure of BCD objects can be pretty complex (for example vhd loader). An example of a tool using BCD WMI provider programmatically is Visual BCD Editor - a complete BCD editor (other BCD tools can edit only parts of BCD and only simple objects, they fail on more complex objects). Exploring any BCD sh

Categories : Windows

Windows Phone: How to set the Value of TimeSpanPicker Programmatically?
If you take a close look at the error you are getting, it says that it can not automatically convert a string to a TimeSpan and that the Value is expecting a TimeSpan. If you further look at your TimeSpan Object you will find that it has a Parse Method. So something like this will work for you. TimeSpanPicker ts= new TimeSpanPicker(); ts.Value= TimeSpan.Parse("00:00:00");

Categories : Windows Phone 8

Closing windows (not Swing) programmatically in Java
Try using the taskkill command example: taskkill /IM notepad.exe this site has some of its uses, maybe it will help! :) http://www.tech-recipes.com/rx/446/xp_kill_windows_process_command_line_taskkill/ try{ Process process = runtime.exec("taskkill /IM notepad.exe"); } catch (IOException ioe){ JFrame alertFrame = new JFrame(); JOptionPane.showMessageDialog(alertFrame, "Error closing notepad."); } I haven't tested the taskkill command but this is from a working example

Categories : Java

How to close all windows in Matlab in a GUI created programmatically?
This problem can be reproduced with f = figure; set(f, 'deletefcn', @(src, evt)close('all')) close all However, in 2013a you get a slightly more informative warning Warning: A callback recursively calls CLOSE. Use DELETE to prevent this message. > In /Applications/MATLAB_R2013a.app/toolbox/matlab/graphics/close.p>request_close_helper at 167 In /Applications/MATLAB_R2013a.app/toolbox/matlab/graphics/close.p>request_close at 253 In /Applications/MATLAB_R2013a.app/toolbox/matlab/graphics/close.p>close at 124 In @(src,evt)close('all') In closereq at 18 In /Applications/MATLAB_R2013a.app/toolbox/matlab/graphics/close.p>request_close at 256 In /Applications/MATLAB_R2013a.app/toolbox/matlab/graphics/close.p>close at 124 What's probably happening is that when

Categories : Matlab

Programmatically unprotect MS Excel VBA project in Windows 8
I had the same issue with Module password. However and i know this sounds a little twisted but the only way i could work out how to unprotect the module was to locally store a copy of the module unprotected, use code to remove the exiting module and export in the unprotected version, then make the changes required using VBA then do vise verse back again. utilizing the export and import function on the module. you'll need to store the protected and unprotected versions locally in separate folders. Hope this helps!

Categories : Excel

How do I launch a Windows Store application programmatically?
The correct way to launch Metro applications is to use the IApplicationActivationManager interface. This is also what Visual Studio itself uses for launching the application. All methods on the interface have a DWORD out parameter which gets you the PID of the newly launched process.

Categories : C++

How to pass some parameter to windows service when run programmatically
Okay, i think this ís possible, however, I think it can only be done in a different manner because ServiceController (and Windows Services in general) do not accept parameters. My guess would be: Stop Service (which starts c:program.exe "Param A") Delete Service. Add Service (which starts c:program.exe "Param B") Start Service. However, I'd recommend getting the parameters (or variables) into the application by using DB connection, resource files - the usual route. Ofcouse, you could combine both paths, using a config.ini file as paramater and editing this file (once you've stopped the service). Your application would receive an array of arguments which you can process

Categories : C#

Using standard Visual Studio windows programmatically
If you have a Team Foundation Server setup, which it looks like you do, then you can probably achieve this by working through the tfs web portal. For me the "Create Work Item" is found under: http://myserver:8080/tfs/<Collection>/<Project>/_workItems

Categories : Visual Studio 2012

Unable to install a Windows Service programmatically
public static class SelfInstaller { private static readonly string _exePath = Assembly.GetExecutingAssembly().Location; public static bool InstallMyService() { try { ManagedInstallerClass.InstallHelper(new string[] { _exePath }); } catch { return false; } return true; } public static bool UninstallMyService() { try { ManagedInstallerClass.InstallHelper(new string[] { "/u", _exePath }); } catch { return false; } return true; } public static bool IsInstalled(string serviceName) { var serviceExists = ServiceController.GetServices().Any(s => s.ServiceName == serviceName); if (se

Categories : C#

If you know the windows administrator password is there any way to get past UAC programmatically?
Pretty sure the only way to bypass UAC is to create a Windows Service. This will not ask for credentials when elevating to administrative priveleges.

Categories : Security

Store Files programmatically Windows phone 7 & 8
You could save the data in the IsolatedStorage until an internet connection is available and back it up then. Users will love you for offering SkyDrive and DropBox backup. That is the way you should go! There is no way to save data offline even if an App gets uninstalled on Windows Phone. That is part of the sandbox priciple.

Categories : File

Change Tab Bar Programmatically
As @H2CO3 mentioned, there is no tabBarController property in NSTabView. If you read the documentation, you’ll notice that NSTabView provides a few selection methods, including -selectTabViewItemAtIndex:, which you can use like so: - (IBAction)startScratch:(id)sender { [_mainTabBar selectTabViewItemAtIndex:1]; } Note that the first tab is at index 0.

Categories : Objective C

How to detect the difference between a change made by a user and a change made programmatically?
If you just change the value with el.value = x, the change event is not triggered. For example, this won't log anything to the console: var el = document.getElementById('el') el.onchange = function(){ console.log('changed'); }; el.value = 'asasassasa'; So, if you're seeing it's being triggered twice, it's either because: You're manually triggering it with el.onchange(). In this case, just remove the this call. Or: The event handler is bound to the element more than once. You have to locate where that's happening.

Categories : Javascript

Adding new user control programmatically in windows forms
You need to add your user control to the display surface of the main form (or another container already present) MainScreen home = new MainScreen(); home.Show(); EntrySuggestion t_ES = new EntrySuggestion(); home.Controls.Add(t_ES);

Categories : C#

Programmatically-created subfolder not visible in Windows Explorer
@dtb was too humble (or busy) to repost his comment (which solved my problem) as an answer, so I'll copy his comments here to make it easier for others to see how this turned out: "Check if you can find your directory & file somewhere in C:UsersJimCAppData (Folder virtualization). related: Why Virtualization on ProgramData folder in MS Vista?" So here is what I did after reading his advice: I deleted the virutalized directory from under C:Users and it started working fine. Not sure how it got created in the first place, but seemingly, while it exists, attempts to create the directory where I was expecting it finds the virtualized one instead. Thanks again dtb.

Categories : C#

How to get a particular image from media library in Windows Phone programmatically?
You can put a search criteria as a parameter for the First or Last method: var picture = media.Pictures.FirstOrDefault(p => p.Name.Contains("sample.jpg")); if (picture != null) { // Picture found }

Categories : Image

Windows phone 8 - bring application to foreground programmatically
No way. Only the user can bring an application to the foreground. What you could do is to create a Toast notification, to notify the user. That way, if he taps on the notification, the app would open. Toast notifications for background agents for Windows Phone ShellToast is one of the features that can be used in applications running in background: Features that can be used while running in the background for Windows Phone 8

Categories : Windows Phone 8

Programmatically determine if Windows 8 secure boot is enabled
MSinfo32.exe read the value UEFISecureBootEnabled from the registry under HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSecureBootState. On my system SecureBoot is disabled and return value is 0. So I assume that 1 means enabled.

Categories : C#

programmatically add appointment directly to calendar in windows phone 8
You can add appointment with the SaveAppointmentTask: http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj207038(v=vs.105).aspx Please note that you can't silently create an appointment as the user interaction is needed for security reason.

Categories : Windows Phone 8

How do you clear a windows media player playlist programmatically c#
See PlaylistCollection.remove(). So I think you could remove the playlist with: axWindowsMediaPlayer1.playlistCollection.remove("myplaylist"); Then simply create it again: playlist = axWindowsMediaPlayer1.playlistCollection.newPlaylist("myplaylist");

Categories : C#

Programmatically create/destroy network bridges with .NET on Windows 7
It turns out that, unfortunately, there is no documented way of setting up a network bridge. The code which does that is located inside hnetcfg.dll, and is invoked only by Windows Explorer. It installs bridge driver, and configures bridge interface. It might be possible to call it yourself (using COM), but that would require reverse engineering and may break on any system update, so I recommend against doing that.

Categories : C#

Placing an ellipse on a canvas programmatically on a Windows 8 store app
Try this: Canvas.SetLeft(newEllipse, aCanvas.ActualWidth/2.0); Canvas.SetTop(newEllipse, aCanvas.ActualHeight/2.0); I didn't try it, but it worked for me all the time. Edit: Ahh and you should probably first add the ellipse to the canvas before moving the ellipse around.

Categories : C#

Changing proxy settings programmatically in Windows for DSL connections
Here is a utility sample class that does it. You use it like this: static void Main(string[] args) { // read direct proxy server (return null if there isn't) of the connection named "MyConn" string server = ProxyUtilities.GetDirectProxyServer("MyConn"); // set a direct proxy server (set to null to disable) to the connection named "MyConn" ProxyUtilities.SetDirectProxyServer("MyConn", "myproxy:8080"); } And the utility class: public static class ProxyUtilities { public static string GetDirectProxyServer(string connectionName) { List<INTERNET_PER_CONN_OPTION> options = new List<INTERNET_PER_CONN_OPTION>(); INTERNET_PER_CONN_OPTION option = new INTERNET_PER_CONN_OPTION(); option.dwOption = INTERNET_PER_CONN_PROXY_SERVER;

Categories : C#

Programmatically removing an Object from a Grid in Windows Metro
In the class header I've declared private: concurrency::reader_writer_lock myLock; And changed the implementation to: storyboard->Completed += ref new EventHandler<Object^> ([this,birthImage](Object^ sender, Object^ e) { unsigned int index; myLock.lock(); if (mainGrid->Children->IndexOf (myImage, &index)) { mainGrid->Children->RemoveAt (index); } myLock.unlock(); }); Notice the declaration of unsigned int index as a local variable to the lambda function.

Categories : C++

How to start Windows 7 application "recent session" programmatically?
I don't know if this is supposed to be by design, but it is definitely different behavior than earlier versions, and it is very annoying (at least for me). First off, I don't use the tabbed session feature often. I much prefer a separate window per session (selectable via Win7 task bar). In versions pre-5.2, opening a pinned or recent session from the jump list will prompt for password and open the session in a new window. In 5.2 beta, opening a pinned or recent session from the jump list will prompt for password and open the session in an existing WinSCP window. What is even more annoying, however, is that focus does not switch to the window, so if you have an existing WinSCP window behind other windows it will be prompting for a password without any visible indication that user int

Categories : C#



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.