Modifying system folder?
Posted: Tue Nov 08, 2011 1:29 pm
Hello Andrew,
I’ve noticed an annoying behavior in Vistumbler (v10-b5) and offer a possible solution. Release 10 of Vistumbler tries to use a “temp folder” in the system program file path for its work files. This “peeing in the system pond” is considered rude programming. Each instance of a program should pee in its own pond. I’ve looked at the source code that you provide and believe that I can offer the following suggestion.
In the source code for Vistumbler 10, near line 52 contains this statement: “Dim $TmpDir = @ScriptDir & '\temp\'”.
This statement appears to set the value of “$TmpDir” using something called “@ScriptDir”, which apparently contains the path of the folder where the executable program lives. After installing Vistumbler with the normal installation, that folder is “C:\Program Files (x86)” – at least on my machine.
A better way to set $TmpDir would be to use the “temp” environment variable that Windows provides. This is a string that points to the temporary files folder for the current user.
You can check this by getting into the command prompt and typing “echo %temp%”. If you build the path to the temporary folder using this environment variable instead of @ScriptDir, Vistumbler should stop trying to write to the system folder.
Many other programs use this path for their work files, too. So, you should create a subdirectory off of that path for “%temp%\Vistumbler\” and use that string as your temporary files path.
The exact code to do this would depend, of course, on how "autoit" interacts with Windows.
The current code causes Vistumbler to try to modify the contents of a system folder. That might be the reason why the anti-malware programs are beating you up. Making this change could fix that problem, too.
Regards,
PhilC
I’ve noticed an annoying behavior in Vistumbler (v10-b5) and offer a possible solution. Release 10 of Vistumbler tries to use a “temp folder” in the system program file path for its work files. This “peeing in the system pond” is considered rude programming. Each instance of a program should pee in its own pond. I’ve looked at the source code that you provide and believe that I can offer the following suggestion.
In the source code for Vistumbler 10, near line 52 contains this statement: “Dim $TmpDir = @ScriptDir & '\temp\'”.
This statement appears to set the value of “$TmpDir” using something called “@ScriptDir”, which apparently contains the path of the folder where the executable program lives. After installing Vistumbler with the normal installation, that folder is “C:\Program Files (x86)” – at least on my machine.
A better way to set $TmpDir would be to use the “temp” environment variable that Windows provides. This is a string that points to the temporary files folder for the current user.
You can check this by getting into the command prompt and typing “echo %temp%”. If you build the path to the temporary folder using this environment variable instead of @ScriptDir, Vistumbler should stop trying to write to the system folder.
Many other programs use this path for their work files, too. So, you should create a subdirectory off of that path for “%temp%\Vistumbler\” and use that string as your temporary files path.
The exact code to do this would depend, of course, on how "autoit" interacts with Windows.
The current code causes Vistumbler to try to modify the contents of a system folder. That might be the reason why the anti-malware programs are beating you up. Making this change could fix that problem, too.
Regards,
PhilC