Hi guys, I have Windows7 installed on my PC and my vbScript includes a Sub that attempts to create a new settings.ini file (with my program's settings) inside the "c:\program files\".
This is my code:
Set oFSO = CreateObject("Scripting.FileSystemObject")
sFilePath = "C:\Program Files\Vbsedit\settings.ini "
Set FileObject = oFSO.CreateTextFile(sFilePath)
FileObject.WriteLine "Hello World"
The code does not give an error but I can not find the file "C:\Program Files\Vbsedit\settings.ini
". It is not get created. Any ideas how I can make it work in folders like "C:\Program Files\" ???