I am working on some desktop based application, which required access to MKS through command line. I am able to understand and run MKS si commands successfully.
Here, I need help in saving "gui" window which opens through MKS si command at some location. For Example:-
Steps:-
After connecting to MKS using si connect command
Use command to view sandbox member history with "gui" option say:-
"si viewhistory --gui --sandbox="sandbox path" --fields=revision memberfile.xml"
Above command will open the MKS UI of Member history.
Here, instead of opening the UI at desktop, I want to save this UI at some location on my desktop say "Libraries\Pictures".
Kindly suggest,
Thanks in Advance.
Related
I have a situation in which I wanted to utilize the camera app in Windows 10 from my Microsoft Access program. Normally I could just send a command to execute the program's executable, but with the metro app there is no straightforward executable.
The basic code I use is this:
Shell """" & PthToExe & """", vbNormalFocus
PthToExe is the path name for the executable.
I looked around a decent bit, but was unable to find any simple solutions and ended up coming up with my own. My solution is to make a shortcut link to the camera application and then to launch the link.
In order to make a shortcut link in Windows 10, you can click on the start button, go to "All Apps", find the app you want (in my case "Camera"), and then click and drag it to the desktop.
Now that you have a shortcut, you can launch the shortcut from a command line. (So my shortcut doesn't clutter up my desktop, I dragged it off my desktop and into a folder on the "C" drive.)
Type the path into a command prompt like this and hit enter to test launching your app: C:\GJ\Camera.lnk
So that solves the problem if you wanted to launch from a command line. For some reason, though, Access would not accept that command. The way I got around it was I put the command in a batch file (Edit: Alternatively, see HansUp's comment). To do that, you just need to open notepad, type in the same thing you typed in the command prompt, save the note pad document, and then rename the document to have a .bat extension.
You can then execute the .bat file from Microsoft Access as follows:
Shell "C:\GJ\OpenCamera.bat", vbMinimizedNoFocus
Note that normally, I use vbNormalFocus when running the shell command, but in this case, it is desirable not to see the little command prompt open before the actual program opens.
I'm using Windows Server 2012, and I want to disable the cmd and the PowerShell for the clients. I've searched in the Group Policies but i didn't find where I can do this. Please can somebody help me?
Disable access to powershell:
In the Group Policy window for those users, on the left-hand side, scroll down to User Configuration > Administrative Templates > System > Don’t run specified Windows applications.
In the properties window that opens, click the “Enabled” option and then click the “Show” button.
In the “Show Contents” window add --> powershell.exe
User Cfg - Admin Templates - System - Prevent access to the command prompt
Prevents users from running the interactive command prompt, Cmd.exe. This setting also determines whether batch files (.cmd and .bat) can run on the computer.
If you enable this setting and the user tries to open a command window, the system displays a message explaining that a setting prevents the action.
Note: Do not prevent the computer from running batch files if the computer uses logon, logoff, startup, or shutdown batch file scripts, or for users that use Terminal Services.
I have no idea about powershell anything.
I am using NSIS to create installer for my application. I want to provide the feature in which user can double click and open a file of a particular file extension in my application. I have followed instructions provided in this link: http://gergo.erdi.hu/blog/2006-10-08-registering_windows_file_types_with_nsis/.
But it doesn't create registry key for me. My guess is that probably the installer has to be run as an administrator. But I don't unnecessarily want to prompt the user for administrative privilege.
How can I then associate my custom file type and icon with my application?
PS: I am using Windows 7 64 bit.
Try to write the keys into HKEY_CURRENT_USER\Software\Classes instead of HKEY_CLASSES_ROOT. This should work without administrator privileges under Vista and later.
Beginner question - Trying to create a simple logon script that executes when a Windows user logs on and copies a file from one folder to another. The OS is Windows 7.
This link says that logon scripts should go into
%SystemRoot%\System32\Repl\Import\Scripts folder.
I do not seem to have that folder in my machine. I created it manually and pushed the vbs file in there.
I also opened up computer management and assigned the script to a user. This is a standalone machine and has no network logons.
Code itself is simple and it works when the file is run except it is not getting called during logon.
Is this the right place to put the logon script? Am I doing something wrong.
Eventually I would like to be able to assign the logon script in C# using DirectoryEntry's LogonScript property. Any suggestions in the right direction would be of great help.
Windows has 2 default locatations for local logon scripts:
%SystemRoot%\System32\Repl\Import\Scripts for logon scripts assigned via lusrmgr.msc.
%SystemRoot%\System32\GroupPolicy\User\Scripts\Logon for logon scripts assigned via gpedit.msc.
Both paths don't exist in a default installation and must be created by an administrator.
lusrmgr.msc seems to accept only scripts with paths relative to the default location. For scripts assigned via gpedit.msc you can choose any path you like.
A (local) logon script must be assigned to a profile by one of the abovementioned methods, otherwise it won't be called at logon.
At the moment I try to figure out if it is possible to start ManyCam automaticaly showing a picture i configure via a configuration file or via command line parameters.
I am afraid that this might be not possible so i also search for similary software as manycam, which enables this options. Additionally the software must run on windows.
The ManyCam Support answered: It is not possible right now to start ManyCam with parameters from command line.
The following command, when placed in a batch file, opens manycam when the batch file is clicked.
start "" "C:\Program Files (x86)\ManyCam\Bin\ManyCam.exe"