I really HATE static scripts – and most of administrators use them. Static script means that paths, server names etc. are hardcoded to these scripts.
I am using quite simple method to workaround.
First method is using variable for current directory. This is extremely usefull for network scripts. The implementation is quite simple, you just need to include this two lines in your script and it will create variable Path.CurrentDirectory.
As you can see, its really easy.
I will talk about second method tomorrow – it is really useful for centralizing .ini files in your environment.
EDIT: Repaired typo… Thx BG for comment.