i did the following vbscript code to write a text file called "level.txt" in C:\Documents and Settings\All Users\Application Data\secon\generator
Const CommonAppData = &H23&
Const PATH = "\secon\generator"
Dim fso, MyFile
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(CommonAppData)
Set objFolderItem = objFolder.Self
Set fso = CreateObject("Scripting.FileSystemObject")
Set MyFile = fso.CreateTextFile(objFolderItem.Path & PATH & "\level.txt", True)
MyFile.Close
this is working fine in XP,but windows2008 server machine its not creating any body has idea how to do this.How can i implement "SHGetFolderPath" for "CSIDL"