You can download an .ova appliance for VirtualBox here https://developer.microsoft.com/en-us/windows/downloads/virtual-machines , unzip it, then open it in VistualBox , create a "shared" folder to exchange files with your host....
a very powerful and safe way to experiment without risking the health of your main Windows installation.
The images last only for 3 months, that's good enough for me :)
I see that also a Hyper-V image is available...
Showing posts with label windows. Show all posts
Showing posts with label windows. Show all posts
Friday, March 22, 2019
Tuesday, January 10, 2017
Poor man's wget for Windows
Windows not only is an awfully stinking mastodon, but it even lacks the most basic tools commonly available on Linux, such as telnet and wget.
I have found a bare bones wget implementation for Java and duly simplified (I love to strip away all useless exception handling)
All the credits to Alexander.
I have found a bare bones wget implementation for Java and duly simplified (I love to strip away all useless exception handling)
import java.io.InputStream;
import java.io.DataInputStream;
import java.io.BufferedInputStream;
import java.net.*;
public class JGet {
public static void main(String[] args) throws Exception {
if ((args.length != 1)) {
System.err.println("\nUsage: java JGet [urlToGet]");
System.exit(1);
}
String url = args[0];
URL u;
InputStream is = null;
DataInputStream dis;
String s;
try {
u = new URL(url);
is = u.openStream();
dis = new DataInputStream(new BufferedInputStream(is));
while ((s = dis.readLine()) != null) {
System.out.println(s);
}
} finally {
is.close();
}
}
}
All the credits to Alexander.
Labels:
windows,
windowssucks
Wednesday, August 20, 2014
Git, configuring SSH on Windows
a great feature of git ssh is that, when it fails, you are left with very vague error messages that can point to 1000s of different causes. It could hardly stink more. Really only for the expert.
c:\pierre>git clone ssh://git@stash.acme.com:7999/pup/puppet-pippov2.git
Cloning into 'puppet-pippov2'...
Could not create directory '/c/WINDOWS/system32/config/systemprofile/.ssh'.
The authenticity of host '[stash.acme.com]:7999 ([10.56.8.198]:7999)' can't be established.
RSA key fingerprint is fb:09:c7:a7:79:07:99:35:3a:88:51:18:59:a6:8e:75.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/c/WINDOWS/system32/config/systemprofile/.ssh/known_hosts).
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I really have no clue where this systemprofile is coming from... must be some Windows default...
c:\pierre>echo %userprofile%
C:\Users\Pierluigi
c:\pierre>echo %HOME%
C:\WINDOWS\system32\config\systemprofile
Aha, see: the %HOME% variable is set to something WRONG.
I tried EXPLICITLY setting the %HOME% variable as a SYSTEM environment property (not a USER.... it didn't work....):
c:\pierre\vagrant>echo %HOME%
C:\Users\Pierluigi\
Now it all works. It can create the known_hosts file.
Windows stinks.
![]() |
| git and ssh, two skunks |
c:\pierre>git clone ssh://git@stash.acme.com:7999/pup/puppet-pippov2.git
Cloning into 'puppet-pippov2'...
Could not create directory '/c/WINDOWS/system32/config/systemprofile/.ssh'.
The authenticity of host '[stash.acme.com]:7999 ([10.56.8.198]:7999)' can't be established.
RSA key fingerprint is fb:09:c7:a7:79:07:99:35:3a:88:51:18:59:a6:8e:75.
Are you sure you want to continue connecting (yes/no)? yes
Failed to add the host to the list of known hosts (/c/WINDOWS/system32/config/systemprofile/.ssh/known_hosts).
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I really have no clue where this systemprofile is coming from... must be some Windows default...
c:\pierre>echo %userprofile%
C:\Users\Pierluigi
c:\pierre>echo %HOME%
C:\WINDOWS\system32\config\systemprofile
Aha, see: the %HOME% variable is set to something WRONG.
I tried EXPLICITLY setting the %HOME% variable as a SYSTEM environment property (not a USER.... it didn't work....):
c:\pierre\vagrant>echo %HOME%
C:\Users\Pierluigi\
Now it all works. It can create the known_hosts file.
Windows stinks.
Tuesday, July 22, 2014
Revocation information for the security certificate for this site is not available.
one of our workstations was getting regularly this popup "Revocation information for the security certificate for this site is not available. Do you want to proceed?". It's a Windows 7 machine.
Clicking on "view certificate" it was showing one of our certificates. Opening the certificate we discovered that there is a Certificate Revocation List
They tried "Start, then Control Panel, then Internet Options, then Clear SSSL State", they also checked that the date/time was correct.
This article http://www.brighthub.com/internet/security-privacy/articles/82291.aspx is a sort of universal source of truth for this issue.
Then we discovered simply that the CRL URL was not accessible from that workstation, because the proxy was blocking it. Granting access to that URL solved the issue.
Clicking on "view certificate" it was showing one of our certificates. Opening the certificate we discovered that there is a Certificate Revocation List
They tried "Start, then Control Panel, then Internet Options, then Clear SSSL State", they also checked that the date/time was correct.
This article http://www.brighthub.com/internet/security-privacy/articles/82291.aspx is a sort of universal source of truth for this issue.
Then we discovered simply that the CRL URL was not accessible from that workstation, because the proxy was blocking it. Granting access to that URL solved the issue.
Labels:
certificate,
security,
windows
Thursday, July 3, 2014
wget for Windows
If you are stranded on a Windows machine and you need to do a wget, you will be horrified to discover that there is not such tool.
Here http://nyquist212.wordpress.com/2013/09/23/powershell-webclient-example/ they show how to use PowerShell to emulate the command.
For me, this simple code worked:
run PowerShell,
Windows is so pathetic that if I were a Microsoft developer I would pretend I work serving fries in a Mac Donald to avoid being shunned by my neighbors...
Here http://nyquist212.wordpress.com/2013/09/23/powershell-webclient-example/ they show how to use PowerShell to emulate the command.
For me, this simple code worked:
run PowerShell,
Function Get-Webclient ($url, $out) {
$request = New-Object System.Net.WebCLient
$request.DownloadFile($url, $out)
}
Get-Webclient "http://www.google.com" "C:\tmp\Foo3.txt"
Windows is so pathetic that if I were a Microsoft developer I would pretend I work serving fries in a Mac Donald to avoid being shunned by my neighbors...
Labels:
windows
Monday, October 14, 2013
Windows: grant Everyone full control on your external hard disk
If you have Windows on your company's laptop, here is a good news: it could be worse, you could sleep under a bridge and being gnawed by rats. That's definitely worse than having to use Windows. Not MUCH worse, though.
So you have plugged in your external hard drive and copied some files. Big mistake. Windows will immediately take ownership of your device and change ownership and access rights, so that the same hard drive will not be readable from a different machine with different users. This is Windows. Remember: Eastern Europe under Nazi occupation in WWII was worse off, so don't complain.
To grant Everyone full control on all files recursively, just do this:
where g: is your external hard drive.
So you have plugged in your external hard drive and copied some files. Big mistake. Windows will immediately take ownership of your device and change ownership and access rights, so that the same hard drive will not be readable from a different machine with different users. This is Windows. Remember: Eastern Europe under Nazi occupation in WWII was worse off, so don't complain.
To grant Everyone full control on all files recursively, just do this:
icacls g:\ /grant Everyone:f
where g: is your external hard drive.
Labels:
windows
Monday, June 24, 2013
Enabling/Disabling remote desktop
If Remote Desktop is disabled on your Windows machine, you have 2 choices:
- install RealVNC, excellent product
- run regedit and set HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services\fDenyTSConnections to 0
see http://technet.microsoft.com/en-us/library/cc722151%28v=ws.10%29.aspx
Of course there is a third possibility: thrown away Windows and install some Linux.
- install RealVNC, excellent product
- run regedit and set HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services\fDenyTSConnections to 0
see http://technet.microsoft.com/en-us/library/cc722151%28v=ws.10%29.aspx
Of course there is a third possibility: thrown away Windows and install some Linux.
Labels:
windows
Wednesday, May 30, 2012
Windows mapping network drives
Open Windows Explorer, Tools, Map Netword Drives,
enter FOLDER (eg \\acme1999\PIPPOPPRD) and click on "Connect Using a different user name", enter username and pw
If you get this message:
"the network folder specified is currently mapped using a different name and pw"
then open a command prompt, enter
net use
if you see \\acme1999\PIPPOPPRD in the list, issue a
net use \\acme1999\PIPPOPPRD /delete
and try again
Welcome to the wonderful world of Widows (TM).
enter FOLDER (eg \\acme1999\PIPPOPPRD) and click on "Connect Using a different user name", enter username and pw
If you get this message:
"the network folder specified is currently mapped using a different name and pw"
then open a command prompt, enter
net use
if you see \\acme1999\PIPPOPPRD in the list, issue a
net use \\acme1999\PIPPOPPRD /delete
and try again
Welcome to the wonderful world of Widows (TM).
Thursday, May 24, 2012
Microsoft Windows performance tips that worked for me
- disable User Access Control http://www.petri.co.il/disable_uac_in_windows_vista.htm
- disable Indexing http://www.howtogeek.com/howto/28450/what-is-searchindexer.exe-and-why-is-it-running/
- disable Everything Search loading on startup (if you have installed it)
- in Control Panel\Performance Information and Tools , Adjust Visual Effects by unchecking everything and leave only Smooth Edges of Screen Fonts
- disable Indexing http://www.howtogeek.com/howto/28450/what-is-searchindexer.exe-and-why-is-it-running/
- disable Everything Search loading on startup (if you have installed it)
- in Control Panel\Performance Information and Tools , Adjust Visual Effects by unchecking everything and leave only Smooth Edges of Screen Fonts
Labels:
windows
Sunday, October 2, 2011
Tabbed Command prompt in Windows
http://sourceforge.net/projects/console/files/
it's called Console2 and it's pretty cool.
One wonders why Microsoft haven't made their "DOS" CLI a bit prettier in all these years...
it's called Console2 and it's pretty cool.
One wonders why Microsoft haven't made their "DOS" CLI a bit prettier in all these years...
Labels:
windows
Friday, July 2, 2010
Windows Explorer cannot find files
http://support.microsoft.com/default.aspx?scid=kb;en-us;309173
set the FilterFilesWithUnknownExtensions DWORD value to 1 in the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ContentIndex
Remember also to enable the "find hidden files" advanced option.
This is one of those jaw-dropping things ... why on earth would you NOT want to find files with unregistered extension...
set the FilterFilesWithUnknownExtensions DWORD value to 1 in the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ContentIndex
Remember also to enable the "find hidden files" advanced option.
This is one of those jaw-dropping things ... why on earth would you NOT want to find files with unregistered extension...
Labels:
windows
Saturday, June 12, 2010
Windows Explorer Open a Command Prompt
Here
http://javatoolsforweblogic.googlecode.com/svn/trunk/windowsTricks/dosprompt.reg
the registry entry to create the command in Windows Explorer.
I was tired of googling for it every time I work on a new computer.
http://javatoolsforweblogic.googlecode.com/svn/trunk/windowsTricks/dosprompt.reg
the registry entry to create the command in Windows Explorer.
I was tired of googling for it every time I work on a new computer.
Labels:
windows
Subscribe to:
Posts (Atom)
