Browse by Tags

All Tags » Scripting (RSS)

Create file with specified size

Yesterday I run into very strange problem with one of my friends - Echo. stopped working. In batch scripts, you use Echo to output something to screen - and of course you can redirect it to file. By using Echo. (mind the dot), you specify that you want...
Posted by martin | 3 comment(s)
Filed under: ,

Lnk, shortcuts - real disaster??

Maybe you noticed that one of my projects I would like to finish in summer is also offline shortcuts editor - and you probably think "why some editor when I can build shortcuts using Explorer?"... Think twice - it's not as easy as it looks...

When is storing configuration in Windows directory good idea?

Well, I know this is quite controversial, but in some cases (specially scripting frameworks) I think it is good idea to use Windows directory to store some settings\configuration... Why that? Generally you can always divide such solutions to push or pull...
Posted by martin | with no comments
Filed under: ,

SystemSherlockGUI - one package that rules them all ;)

Good news everyone - I just received email from Roger (a.k.a. Kephyr) - he is author of brilliant SystemSherlock. He allowed me to include SystemSherlock in one package with my GUI - so now you can download one package with both GUI and command line interface...

SystemSherlock - snapshot using GUI or CMD

Recently I wrote about SystemSherlock Lite - really nice snapshoting tool that supports command line... I also posted small utility for parsing log files. After that I started to heavily use SystemSherlock - and I must say that it is really really great...

Utility to display logs from SystemSherlock Lite

As mentioned in my post about SystemSherlock Lite , I really love this tool after few days... Only problem I had is that it can take some time to realize what really happened - you need to read pretty big log files and you can spend precious time reading...

Another nasty Robocopy bug

Recently I wrote about bug I found in Robocopy - one of my favorite utilities... And today I found another one. I am using robocopy for synchronization - which is VERY important part of our framework (if nothing is synchronized, nothing can be executed...
Posted by martin | 5 comment(s)
Filed under: ,

Make snapshots of filesystem and registry using command line

Some installers can be very mysterious - this suddenly applies for MSI packages, even using full logging, it is not easy to find out which registry keys or files were modified\deleted\added. If you have application that is using some custom installer...

New (simple) tool - SimpleScheduler

I run into simple problem - I needed some (very basic) implementation of scheduled tasks. Scheduled tasks that are built-in to windows are not my best friend - problem is that (before Windows Vista, here they are completely different beast) it was not...
Posted by martin | with no comments
Filed under: ,

Useful tools for scripts

One of my favorites are from SST (Shell Scripting Toolkit) from Bill Stewart ( http://www.westmesatech.com/ ), but I dont understand why they are not really known in community. So I decided to post a little bit about them, maybe someone could be interested...
Posted by martin | 1 comment(s)
Filed under: ,

Ugly bug in Robocopy - ignoring security on file level

I really like RoboCopy (robust file copy) utility from Microsoft - if you dont know this tool (I would be surprised), it adds tons of features to standart Copy command - and probably the most useful is /MIR (mirror) that creates mirror of source folder...
Posted by martin | 14 comment(s)
Filed under: ,

Empty tokens in For /f?

I received email with following question from Otto: I have file with delimiters, however not every token have values. For example following file: test1;test2;test3 t1;;t3 ;te2;te3 tes1;tes2; If I try to use For /f to parse it (For /f "usebackq delims...
Posted by martin | with no comments
Filed under:

HookApplication - some real-life examples

I still dont think its time for public release, however I just wanted to share with you some different situations where I liked to use HookApplication... For most of this actions I needed to write some plugins - I decided to keep HookApplication as simple...
Posted by martin | 1 comment(s)
Filed under: ,

Introduction to batch services

This blog post is going to be interesting mostly for people that got already a lot of experiences with batch scripting. I am going to talk about quite interesting stuff I call batch services - I love this technology and it saved me and helped me many...
Posted by martin | with no comments
Filed under:

How to detect if folder exist (and ignore file with same name ;))

Today I experienced really annoying bug with one of my scripts. It is checking if one folder (in quite complex structure) exists( If Exist Folder... ), if it does, it perfoms some actions and send few mails. However after some time it started to behave...
Posted by martin | 3 comment(s)
Filed under:

How to dial using default RAS connection

TuxExplorer send me question how to dial connection using default RAS connection - I wrote small script (two liner) to do that: For /f "usebackq tokens=1-3" %%i IN (`reg query "HKCU\Software\Microsoft\RAS AutoDial\Default" /v DefaultInternet ^| find ...
Posted by martin | 3 comment(s)
Filed under:

How to specify timeout for script?

Maybe you run into this issue before - you want to run some script/utility (for example query user), but you know that it hangs sometimes and you would like to have some kind of timeout utility. There is way how to handle this in batch scripts using two...
Posted by martin | with no comments
Filed under:

Security issue with PowerShell

Hi guys, after (too) long time I can finally return to Powershell (I spend few months creating batch framework to manage citrix servers, right now it is about 980 scripts). I was playing with Get-Credential: $Operator = get-credential I provided my username...
Posted by martin | 3 comment(s)
Filed under: , ,

Using functions in cmd (advanced scripting no.3)

Comment from Alun Jones (thx!) reminds me I forget to mention "functions" in batches! We were talking about script block, which are great if you combine them with call... Lets have a look what I have in my mind: Echo Beginning... ... ... Call :CheckForUserName...
Posted by martin | with no comments
Filed under:

Script blocks in CMD (advanced scripting no.2)

Well, I know I talked about this few times, but I decided to write more comprehensive article about this (this will follow previous about delayed expansion). Many people think batches are stupid - I dont agree, I think you can do miracles with batches...
Posted by martin | 4 comment(s)
Filed under:
More Posts Next page »