spot7.org logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
  Home » WINDOWS » Page 1
psexec fails with error Could not start PsExec service on NTDB2UT02:
I have struggled with this on 2003 server and found that when I turned off firewall everything worked, then when turning firewall back on it didn't. I found the problem under firewall exceptions "File and Printer Sharing". When you go to edit the service, there are 4 entries, and when you check the scope they are set for your network subnet only. My problem was/is that we use multiple subnets a

Categories : Windows

Expand an x86 .exe to 'C:WindowsSystem32' under both Windows x86 and x64?
Answered in parts like your question: ArchitecturesInstallIn64BitMode Valid values: One or more of the following, separated by spaces: x64 ia64 Default value: (blank) Description: Specifies the 64-bit processor architecture(s) on which Setup should install in 64-bit mode. If this directive is not specified or is blank, Setup will always install in 32-bit mode. Normally, you should not cha

Categories : Windows

How do I install git-subtree with Cygwin in Windows 7?
git-subtree is not part of a package. However, like gitk you can manually install it wget rawgit.com/git/git/master/contrib/subtree/git-subtree.sh install git-subtree.sh /bin/git-subtree Example

Categories : Windows

How to close TIME_WAIT process?
TIME_WAIT is not a process, it is a state that the operating system places a connection into after it has been closed. This is done to ensure that any packets which are still in-flight are handled correctly.

Categories : Windows

How to execute If loop and find text using batch
Simplify the code. Loop (up to 5 times) calling the process. If the process does not return errorlevel, if in the log file the searched string is not found, then leave the loop. set "logFile=c:logsApp_Error.log" for /l %%x in (1 1 5) do ( echo Loop %%x > "%logFile%" call abc.exe if not errorlevel 1 ( find "Kitchen.Error.NoRepDefinied" "%logFile%"

Categories : Windows

Permanent WMI Event consumer doesnt get triggered, temporary does
OK, after a couple of days of trial and error, I ended up adapting/using a different approach found here. This will launch a script stored in D:scripts everytime a USB is connected and it's permanent. $filter = ([wmiclass]"\. ootsubscription:__EventFilter").CreateInstance() $filter.QueryLanguage = "WQL" $filter.Query = "Select * from __InstanceCreationEvent within 5 where targetinstance isa 'wi

Categories : Windows

What is the default password for Postgres
If you used an unattended installer script, the password will be in the script or associated config file. Otherwise, treat it the same as if you lost/forgot the password rather than never knowing it: Edit pg_hba.conf, setting the auth mode to trust instead of the default md5 In the Services control panel restart the PostgreSQL service Connect with psql or PgAdmin or whatever ALTER USER postgres

Categories : Windows

Windows open ports command line
This will list all open (in use) ports. netstat -na Filtering is a bit harder. This script takes two ports as the (inclusive) range of local ports to filter for. @ECHO OFF SETLOCAL ENABLEDELAYEDEXPANSION SET STARTPORT=%1 SET ENDPORT=%2 FOR /F "delims=|" %%l IN ('netstat -na') DO ( FOR /F "tokens=2" %%a IN ("%%l") DO ( REM IPv6 uses colons, too. SET "LOCAL=%%~a" SET "LOCAL

Categories : Windows

Windows Phone Silverlight 8.1 communicating with Arduino using Bluetooth
Have you tried working with the Windows.Devices.Bluetooth.Rfcomm namespace? It's pretty much made for Windows 8.1 bluetooth communication. Setting device capabilities. <m2:DeviceCapability Name="bluetooth.rfcomm"> <m2:Device Id="any"> <m2:Function Type="serviceId:00001101-0000-1000-8000-00805F9B34FB"/> </m2:Device> </m2:DeviceCapability> Selecting Devi

Categories : Windows

Equal variables - Batch
Save next code snippet, possibly named blabla.bat: @Echo OFF setlocal set complete_name=%1 if "%complete_name:9000=%"=="%complete_name%" ( if "%complete_name:930=%"=="%complete_name%" ( if "%complete_name:310=%"=="%complete_name%" ( echo problem ) else ( echo valid 310 ) ) else ( echo valid 930 ) ) else ( echo valid 9000 ) Exit /B and watch the outpu

Categories : Windows

MySQL Start Server 'Can't connect to MySQLServer'
After a short walk.. . always good to change setting and come back to it! The folder did not have NETWORK SERVICE user read/write on that folder. Adding user to the folder and setting read/write fixed the problem. Hope this helps someone else!

Categories : Windows

how to remove files with the same name in clearcase
You can try and combine cleartool find with del in an exec clause: cleartool find . -name "aname" -exec "del "%CLEARCASE_PN%"" Note the "%CLEARCASE_PN%", which allwos you to work with file having spaces in the path or name. Now if those same files are actually added to source control, del wouldn't be enough: you need cleartool rmname (you can see one example here) cleartool find . -name "anam

Categories : Windows

How to prevent Open With dialog from appearing all the time in windows store app?
From what you describe you don't want to set DisplayApplicationPicker = true. If the user doesn't have a default set then LaunchFileAsync will open the Open With dialog automatically. There is no need to set DisplayApplicationPicker = true; DisplayApplicationPicker = true explicitely says to ignore the default setting. The "always use this app" option sets the default to that app so that normal

Categories : Windows

How to stop jetty server on Windows 7?
There's 2 recommended ways. If you started Jetty with the STOP.KEY and STOP.PORT command line, then you can use those same values with the --stop command line option. If you installed, configured, and then started Jetty as a service, then you can use the windows service utilities to start/stop/restart Jetty.

Categories : Windows

Old Service stopped and new service installed on the same port
The windows services can be started, stopped, installed and uninstalled without restarting the machine. If the old service is stopped and uninstalled and your new service is installed and started, then the new service should take up the freed up ports. If the ports are not freed up, it may be because the old service was not stopped properly, hence the port occupied. But when it comes to 443, I a

Categories : Windows

batch start path his file's file name
You can do this with some for trickery: @setlocal enableextensions enabledelayedexpansion @echo off echo %0 for %%f in (%0) do set basename=%%~nf echo Will run arbitrary-path\%basename% endlocal The %%~nf gives you the name of the %%f variable, without path or extension. If you run it with something like: C:UsersPaxqq.cmd you will see something like: c:UsersPaxqq.cmd Will run arbitrary-path

Categories : Windows

Selection menu in batch?
There is no way that a Batch file can read a cursor control key without the aid of a third party program. However, you may use an interesting trick based on DOSKEY command via this procedure: Clear previous DOSKEY history. Execute several SET /P commands that read the menu options, so the DOSKEY history is filled with them. Send a F7 key to the keyboard. Execute a SET /P "OPTION=Prompt: "; the i

Categories : Windows

How to get desktop path with batch
Like this : @echo off SET DESKTOP_REG_ENTRY="HKCUSoftwareMicrosoftWindowsCurrentVersionExplorerShell Folders" SET DESKTOP_REG_KEY="Desktop" SET DESKTOP_DIR= FOR /F "tokens=1,2*" %%a IN ('REG QUERY %DESKTOP_REG_ENTRY% /v %DESKTOP_REG_KEY% ^| FINDSTR "REG_SZ"') DO ( set DESKTOP_DIR="%%c" ) ECHO Desktop dir: %DESKTOP_DIR% PAUSE

Categories : Windows

Windows batch file net command not setting errorlevel
Don't compare errorlevels like that, as the variable will be expanded before the if block even executes and thus retains its value from before the block. Use the following instead: if not errorlevel 1 ... or use delayed expansion. You can read up about that in help set.

Categories : Windows

Cannot initialize SFTP protocol. Is the host running a SFTP server? WinSCP error
For the error in general please refer to: http://winscp.net/eng/docs/message_cannot_initialize_sftp_protocol Though for your particular case, the problem is likely caused by the server not being able to talk to WinSCP for exchange of the second password. What is the second password for? A sudo? Or SSH tunnel to a second "stage" (whatever that is)? For sudo/su, refer to: http://winscp.net/eng/doc

Categories : Windows

Can't change the header of Hub control in Windows Universal app
Remove the x:Uid="Hub" from the Hub control. <Hub x:Name="Hub" Header="Test Header"/> That way it won't redirect all your strings to the Stringsen-USResources.resw file (it is part of the shared project) If you want to keep it in, then just edit that file and rename the key to anything you like.

Categories : Windows

How to use nested FOR loops in batch files
setlocal enabledelayedexpansion for %%f in (DataFolder*.Ext) do ( set POI=%%~f set POI=!JbPOI:DataFolder=! set POI=!JbPOI:.Ext=! for /f "useback tokens=1,2,3 delims=," %%a in ("%%~f") do ( set CX=%%a set CY=%%b set FN=%%c echo !FN!,9,!CX!,!CY! >> "DataFolder!POI!.tmp" ) ) endlocal I'm not sure if you want to read the file "%%~f" , but I

Categories : Windows

How to get the name of most recently file in specific directory?
dir /b /a-d /o-d | head -1 And just for a native windows alternative dir /b /a-d /o-d | cmd /v /c "set/p.=&&echo(!.!" In both cases, execute a dir command, in bare format, without folders in date descending order and pipe the information into a head command that will retrieve the only the first line (the newest file) or a cmd instance that will retrieve the first line (the ne

Categories : Windows

After setting authenticator: PasswordAuthenticator in Cassandra.yaml, Cassandra CQL Shell does not run
How are you accessing cqlsh? If you have the password authenticator activated, then you will need to specify the default Cassandra super user with the username and password flags. Linux: ./cqlsh -u cassandra -p cassandra In Windows, I'm going to guess that it's something like this: cqlsh -u cassandra -p cassandra Note that once you get in, you'll want to create your own superuser and disab

Categories : Windows

Direct invoking vs call vs start
is there any significant difference between direct invoke and call ? No difference: you would call to call another cmd batch script. It also ensures you return to the current script once the call is done. You can also use it to call an function within your current script.

Categories : Windows

masm errors : error A2006: undefined symbol : BEGIN
MOV DX, OFFESET RING then why END BEGIN? BEGIN is simply a label rather than a segment name or a process name remove END BEGINand add END at the end of file -----UPDATED----- Or maybe you want to tell the linker where the program start if you try to use a small memory model.At this time ,you do need to add this line at the end of file: end BEGIN.which will tell linker the label BEGIN is exa

Categories : Windows

How to get boolean result back from windows command?
The following batch file should do what you need. It checks for successful completion after each msbuild job and if job failed, indicated by errorlevel >0, notifies the user (in CMD window) and exits. When both jobs finish, it tells the user so. You say, "I have following commands in a bat file" so I assume this is the bat called from the vbs file and it includes the call to vsvars32.bat. If this

Categories : Windows

Code coverage for Mocha in Windows 7
This worked for me: I have both mocha and istanbul installed locally (no -g on the npm install). I was running *./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha* and this came up with the error you were seeing above. I have changed this to look in the explicit local folder for mocha *./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha* and now everything is work

Categories : Windows

Perl: stop a command started using perl "system" in windows
I think you can use my $pid = system(1, $cmd1); # One of the following: kill(INT => $pid); # Sends Ctrl-C kill(TERM => $pid); # Sends Ctrl-Break kill(KILL => $pid); # Calls TerminateProcess($handle, 9) waitpid($pid, 0);

Categories : Windows

Automatically minimize desktop app window (or reset priority) on Windows machine
Have you tried to start Skype with the command line parameter /minimized That would start Skype minimized to the tray. And on a second note I would imagine that when the kids can answer a Skype-call, they could be taught to press ALT+TAB after they have answered the call (and thereby switch to the browser). You could also try http://ahkscript.org/ (Auto Hot Key) which is a scripting language

Categories : Windows

Creating SSH server on Windows for Mercurial
Read carefully hg help url and eliminate all Windows-isms from URL path is relative to the remote user's home directory by default. Use an extra slash at the start of a path to specify an absolute path: ssh://example.com//tmp/repository I suppose, for Win-hosts absolute path will start from the root of drive with $HOME of connected user, but relative path is more predictable so

Categories : Windows

Build or Compile Webkit on Windows7 64bit
According to this, it's seems a cygwin-downloader's bug. However, there is a workaround... Just copy {cygwin-downloader}setup.ini file to a {cygwin-downloader}x86 directory. Then reopen setup.exe. It will show you a package list without turbulence. You don't need to click all from the package list. Just click Next.

Categories : Windows

IE cannot access localhost, but chrome and firefox work
Not sure if this will work for you, but I think it's worth a try... 1, Go to Tools --> Internet options --> Advanced (tab) 2, Under Settings, scroll all the way down to Security section. 3, Try check or uncheck TLS and SSL options, one at a time preferably. In my case, I unchecked TLS 1.2 and was able to resolved my issue. I left TLS 1.0 and 1.1 checked, as well as SSL 3.0. You might have to p

Categories : Windows

How to create a jenkins job in order to perform VBoxManage operations on virtual images?
You need to define your Jenkins slave process to run as the desired user. First install Jenkins slave as a Windows service , then go the service properties and in the 'Log On' tab change it from the default 'Local System Account' to "This Account:" - enter your account name (alex) and password. Don't forget to restart the service.

Categories : Windows

Create startup folder - Windows
As far as I know, there is no reliable way to do this. You can get the path with [environment]::getfolderpath("Startup") but the returned string is empty if the folder was neve created. And I don't know any API entry to create it. So you have to manually create it: check if the former command return anything (if yes, just create you shortcut) create yourself the startup folder. Use [environm

Categories : Windows

How to run a batch command in Windows as a different user without typing the password?
The only way to supply the password to runas at runtime is with a script, and not terribly gracefully either. It's ugly, it's hackish, and it's asking for security troubles. Having said that, I've done something similar in the past with WScript.Shell's .run and .SendKeys methods like this: @if (@a==@b) @end /* multiline JScript comment :: runas.bat :: runas with automated password entry @echo

Categories : Windows

use cygwin from cmd.exe
You can use the full paths to the binaries, or create a wrapper script and call that to do the cygwin commands, e.g. #!/bin/bash # doit.sh wrapper script in home dir of cygwin user echo "got args $@" and call it from windows shell with for /L %G in (1 1 100) DO c:cygwininash --login -c "/home/youruser/doit.sh %G" in this case it prints 1..100 out, but your wrapper script can do all the ssh

Categories : Windows

Windows 8 : Merge files in a directory with file name appended
merge_a_and_b.bat echo a.txt > out.txt type a.txt >> out.txt echo. >> out.txt echo b.txt >> out.txt type b.txt >> out.txt You could be fancyer

Categories : Windows

How to prevent PuTTY shell from auto-exit after executing command from batch file in Windows?
The SSH session closes (and PuTTY with it) as soon as the command finishes. Normally the "command" is shell. As you have overridden this default "command" and yet you want to run the shell nevertheless, you have to explicitly execute the shell yourself: avahi-daemon ... ; /bin/bash Also as use of -m switch implies a non-interactive terminal, you probably want to force an interactive terminal ba

Categories : Windows


Recently Add
transfer the data from local machine to remote machine by using batch script.Is it possible or not..?
psexec fails with error Could not start PsExec service on NTDB2UT02:
Expand an x86 .exe to 'C:WindowsSystem32' under both Windows x86 and x64?
How do I install git-subtree with Cygwin in Windows 7?
How to close TIME_WAIT process?
How to execute If loop and find text using batch
Permanent WMI Event consumer doesnt get triggered, temporary does
What is the default password for Postgres
Windows open ports command line
Windows Phone Silverlight 8.1 communicating with Arduino using Bluetooth
Equal variables - Batch
MySQL Start Server 'Can't connect to MySQLServer'
how to remove files with the same name in clearcase
How to prevent Open With dialog from appearing all the time in windows store app?
How to stop jetty server on Windows 7?
Old Service stopped and new service installed on the same port
batch start path his file's file name
Selection menu in batch?
How to get desktop path with batch
Windows batch file net command not setting errorlevel
Cannot initialize SFTP protocol. Is the host running a SFTP server? WinSCP error
Can't change the header of Hub control in Windows Universal app
How to use nested FOR loops in batch files
How to get the name of most recently file in specific directory?
After setting authenticator: PasswordAuthenticator in Cassandra.yaml, Cassandra CQL Shell does not run
Direct invoking vs call vs start
masm errors : error A2006: undefined symbol : BEGIN
How to get boolean result back from windows command?
Code coverage for Mocha in Windows 7
Perl: stop a command started using perl "system" in windows
© Copyright 2017 spot7.org Publishing Limited. All rights reserved.