Skip to main content

Posts

Showing posts from 2017

Excel not enough free memory

Opening files in Outlook shows an error message that there is not enough free memory to run the program. But the computer has enough RAM installed and no other application is running on the computer except Outlook. Office programs by default don't trust or block files originating from the Internet. This is of course a good security settings but if this setting is getting to your nerves because even if the document that is coming from your own domain you are not able to open. Or the file is originating from your own personal email account other than your company email but when it goes to your Outlook you cannot open it. This is the scenario where good and harsh words will start crossing your mind. You will need to ask what the heck is going on? The Microsoft link below provide some solution on how this thing can be resolved. The article title of the link below is: Error message in Outlook: "There is not enough free memory to run this program. Quit one...

How to get uptime in Windows using PowerShell

If you need to monitor how long the machine has been up, or whether the machine rebooted by itself or someone has just rebooted the server for without any reason. Then getting the uptime of the machine or server is important. PowerShell code below gets the uptime by using a command line and processing its output. #========================== #get the uptime and save to text file Invoke-command -ScriptBlock { net statistics server >c:\online.txt }  $xcmd = select-string -path "c:\online.txt" -Pattern "since" | select line |ft -hidetableheaders  write-output $xcmd | out-file c:\online1.txt  $stry = get-content c:\online1.txt | out-string  $concatString = $stry.Substring(18,15) Write-host  $concatString #Get the date $StartDate= [datetime] $concatString $EndDate= (GET-DATE) $xdate = NEW-TIMESPAN –Start $StartDate –End $EndDate write-output $xdate #========================== Sample output: Days    ...

How to print files without opening

How to print multiple files with opening them? How to print multiple PDF files in one go? Printing is an easy and straight forward task, but if you need to print a 100 or more files but time is a constraint then you have to think twice how to do it fast and easy. Of course, open, click and print is the usual method of printing. To print multiple files without opening them in Windows, just go to devices and printers. Double click the printer and it will open a printer task window which shows what files are being printed. In Windows 7 if you right click the printer name, click on "See What's Printing". If you need to print in double side the printer has to be set before printing because it will just print automatically with the default settings. This method works well for a Fuji Xerox printer, but it should also work with other brand of printer. See screen shot below: Cheers! Hope it helps to make things faster. Till next time... =====...

PowerShell registry keys basic operation

Working with registry keys is good and bad. Good if you know exactly what you are doing, bad if you are just experimenting and you mess up the entire system. Anyway, virtual machines will always save the day during test or experiment stage. Once everything is okay then deploy to the actual or production environment. If the test goes haywire, just trash the VM and start all over again. Below are just simple and basic commands in PowerShell to query or get data from the registry. This command below will list all the software listed on HKCU\Software path. Get-ChildItem -Path HKCU:\Software It’s quite useful to run it sometimes, so you will know what software is inside your system. Below will list the user shell folders on the system. Get-itemproperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders' Sample output: AppData                 ...

Filter MsiInstaller installation in Event viewer

How to filter or check successful msi installation on a Windows system? There are quite a lot of ways to filter event viewer, it will solely depend on the taste of the person doing the event viewer audit. It can be done via PowerShell, XML query, or use command line tools and other methods which the Sys Admin feels comfortable doing. But when it comes to auditing logs, it’s a tedious task and takes a lot of time and depends on the raw data that you have so you exactly know what you’re searching for. Command line still a useful tool since it comes handy, you just open the command prompt window and type the command and get the output. The hardest part is how you digest or do another filtering on the output since it might be convoluted with lots of data. But don’t depend on a single tool, make use of whatever you have on your system and other tools available on the net. This command line below filters the MsiInstaller for event ID 1033. wevtutil qe applicati...

How to display Adobe PDF in full screen window

How to display a PDF using Adobe reader or Adobe editor in full screen window? How to display a PDF in presentation mode just like a PowerPoint? Displaying a PDF in full screen mode or in a borderless window with just the contents shown in the screen is quite simple and straight forward. Why do you need to show a PDF in presentation mode? One reason I have in mind is if you only have a PDF in hand that is neatly arrange and beautifully crafted and you need to present. Well, if you will be in the same shoes. Just press Ctrl + L . Yes, Ctrl key + Letter "L". Or ctrl + l key. The PDF will be in presentation mode and every click of the  mouse it will go to the next page. To exit or to return to the normal view window, just press "esc" key. Ctrl + L key, works in Adobe 9 to the latest version. Cheers..till next time… ================================ Free Android Apps: Click on links below to find...

Loop thru custom Textboxes name in VBA or VB.Net

Having a custom name in Textboxes, Listbox, ComboBox in VBA or VB.Net is a good strategy. So, it will be easy to debug the code or analyze the data. If just relying on the default names is also good but it will get messy and it will be hard to control when there’s quite a few of textboxes, and list boxes. And the next person who will maintain the code will find it easier to debug or check the program when proper custom name is assigned to the controls. And that next person might be yourself. So, be gentle and be explicit in giving comments and assigning names to controls. It doesn’t hurt to put a clear comment or an overview of what the piece of code does or what’s the input that the control is accepting. Because greediness breeds greediness, and it will bite back. Anyway, to loop to all the custom or default names is quite easy. Example, if there are 30 or more textboxes in a form. It can be done by a simple for loop like: For x = 1 to 30 GetTboxvalue =    Me....

Add a user in command line in Windows and Linux

How to add a user via command line in Windows and Linux? Adding a user whether in Linux or Windows requires the user have rights to create. In Windows you must be a member of the administrator or other groups who has the rights to create a user. In Linux you must be a root or either a member of the sudoers depending on what distro you are using. In Windows to create  a local user in a Windows client operating system such as Windows 7 or Windows 10. A one liner command can be issued to create a local user, using the command prompt Window at an elevated mode or administrator mode. At the command prompt type: Net user   " username" "password"  /add Net user  << this should be type like that it’s part of the command syntax while username and password, can be any data and of course /add is needed meaning the command is adding a user to the system. Example: net user spiderbond 007-homeSp!dey /add Command will add a user name called spiderbo...

Set a graph or shape in Word behind text using VBA

How to set a graph or shape in Word so it stays behind the text using VBA? In Word the option is to right click an object select wrap text and click the desired options such as behind text, in front of text and other options. Setting a graph behind the text is quite useful, if you need to display some text that will be displayed together with the graph. To do this via VBA is plain and simple, a one liner code. ThisDocument.Shapes("NameOfTheChart").WrapFormat.Type = wdWrapBehind wdWrapBehind is equal to set "Behind Text". The one liner VBA code, of course it will apply to any shapes, circle, oval, square or other shapes not just a graph. Code works on Word 2016, it may or may not word in previous version of  Word.  Cheers. Till next time! ================================ Free Android Apps: Click on links below to find out more: Catholic Rosary Guide  f...