I had just finished working on a project where I needed to programmatically get a web page and save the HTML to a file. I started toying around with some code I used for parsing XML and totally rewrote the code. I found that I kept getting an error of “Microsoft VBScript runtime error: Invalid procedure call or argument”. I couldn’t understand what was going on. I was passing the parameters correctly to the File System Object, but I kept getting the error. All FSO was doing was creating a file and writing the string out. So I checked the length and then started writing the left(string,number) and found it was a character that was in Unicode. So I wrote a Unicode to Ascii function that is not all that efficient, but it is very effective. The sample code below will get a webpage from Google and save it to a file.
Archive for December, 2009
The key to mastering permissions at the command line in Vista and Windows Server 2008 Server is learning the icacls.exe command. With the introduction of Windows Vista, you can no longer select multiple items like folders and files and apply permissions to a group of objects. The recommended way is to use the command line and the icacls.exe command.
Recently I found a problem when using Mac OS X and Windows Server 2003 R2 as a file server. The problem exists in the permissions that are applied to user folders. When applying permissions to shares you normally start out with a very restrictive permission structure at the top. As you create the folders you add permissions for users and groups to permit and restrict access for others. This structure of permissions is very common in dealing with corporate shares. We also share the folder with ‘domain users’ only having change or modify access to the entire share. This eliminates people applying their own permissions and locking everyone out including themselves. This is a common task for a network admin in setting up permissions.