Jump to content

mecablaze

Member
  • Posts

    7
  • Joined

  • Last visited

  • Donations

    $0.00 
  • Country

    United States

About mecablaze

Contact Methods

  • Website URL
    http://www.wintallo.com

mecablaze's Achievements

0

Reputation

  1. My bad. I guess I just figured this problem was one you could take pretty much out of context. Here's some info. nLite GuiRunOnce command: %SOURCE%\RunOnce\start.bat Contents of RunOnce directory: libeay32.dll msvcr71.dll msvcr80.dll openssl.exe ssleay32.dll start.bat wget.exe Contents of start.bat @echo off for /f "tokens=3 delims=\" %%i in ("%USERPROFILE%") do (set user=%%i) 2>&1 echo Creating an instance of wget on user desktop... @mkdir "C:\Documents and Settings\%user%\Desktop\download" @copy libeay32.dll "C:\Documents and Settings\%user%\Desktop\download\libeay32.dll" @copy msvcr71.dll "C:\Documents and Settings\%user%\Desktop\download\msvcr71.dll" @copy msvcr80.dll "C:\Documents and Settings\%user%\Desktop\download\msvcr80.dll" @copy openssl.exe "C:\Documents and Settings\%user%\Desktop\download\openssl.exe" @copy ssleay32.dll "C:\Documents and Settings\%user%\Desktop\download\ssleay32.dll" @copy wget.exe "C:\Documents and Settings\%user%\Desktop\download\wget.exe" cd C:\Documents and Settings\%user%\Desktop\download\ :: the following line is where I got the first access denied error... wget --no-cache --no-clobber --tries 3 --user-agent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1" "http://somewhere.com/sandbox/winget/build.php" :: so I tried this line thinking it was a problem with wget, but the following line throws an access denied as well echo test > test.txt ren "build.php" "download.bat" download.bat Tell me if you need any more information I can provide you with.
  2. Ok. I've posted a related topic in the nLite section, but this forum seems more appropriote for this specific problem I'm having. Okay, so I have a batch file on my windows XP cd called start.bat (the path is %SOURCE%\RunOnce\start.bat). Also in this directory is all files necessary for running wget. This batch file makes a directory on the current user's desktop (successfully) and copies all of the wget .exe's and .dll's to the new directory on the desktop. The batch then changes directory to that new directory and runs a single wget command. When the batch file get's this far, it tries to run the wget command, but access is denied. wget.exe cannot write to the new folder. I figured it was a problem with wget, but then I tried a simple "echo test > test.txt" right before the wget command. Access was denied in the statement too. What it looks like to me is batch files running from a CD do not invoke write priviledges. Has anyone else has this problem?
  3. I have another problem. I get an access denied error when excecuting wget (which was copied from the cd to the desktop) from a batch on the cd. For the sake of simplicity, I have a batch file on my cd and I want that batch file to create a file on the current user's desktop holding the text "test". This is the command I am using right now. for /f "tokens=3 delims=\" %%i in ("%USERPROFILE%") do (set user=%%i) 2>&1 cd C:\Documents and Settings\%user%\Desktop\ echo test > test.txt This code does not work. It gives me an "access is denied" error. Is there a way to enable cd batch scripts to write to the hard drive. Note: I can copy files from the cd to the hard drive. This does not solve my problem because I need a program to write to the hard drive from the batch on the cd. Thanks for the help so far!
  4. I normally use cURL of fopen to test if a link (url) is valid. Try this script. function validURL($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_BUFFERSIZE, 8192); curl_setopt($ch, CURLOPT_TIMEOUT, 5); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); $output = curl_exec($ch); $info = curl_getinfo($ch); curl_close($ch); @$components = parse_url($url); if ( $info["http_code"] == 200 ) { return true; } else { if ( $components["scheme"] == "ftp" && $info["http_code"] >= 200 && $info["http_code"] < 300 ) { return true; } return false; } } Works with http(s) and ftp protocols. Have fun.
  5. Thanks XIII, That's exactly where I got my copy.
  6. That answered my question. Thanks a lot!
  7. Okay. So I'm pretty new to using nLite (thought I have used it for a while just to integrate hard drive controller drivers). I have never used the RunOnce option in the 'Unattended' page. I want RunOnce to run a single batch script. This batch script will wget (http://www.gnu.org/software/wget/) a PHP script I have on my server. This PHP script will generate another batch script which will request a series of useful programs, also using wget. These packages include Firefox, Thunderbird, K-Lite, Notepad++, etc. Don't worry about the logistics of getting the installer for all of these programs. I had to go through a fun time of screen scraping and other crap in PHP. My question for you guys is where I would put an initial batch script and wget in the Windows XP folder before letting nLite dump the entire folder into an ISO. Also what RunOnce commands would I use. Confused? Here's another break-down. Right now, on my desktop I have a folder with a batch script, called start.bat, and all of the necessary exe's and dll's for wget. If I run the batch script, wget is copies to the to the current user's desktop, another batch script is downloaded from my server and then run... I feel like anyone who reads this will be confused. Maybe this will help. Here's the source for my main batch script. @echo off for /f "tokens=3 delims=\" %%i in ("%USERPROFILE%") do (set user=%%i) 2>&1 echo Creating an instance of wget on user desktop... @mkdir "C:\Documents and Settings\%user%\Desktop\download" @copy libeay32.dll "C:\Documents and Settings\%user%\Desktop\download\libeay32.dll" @copy msvcr71.dll "C:\Documents and Settings\%user%\Desktop\download\msvcr71.dll" @copy msvcr80.dll "C:\Documents and Settings\%user%\Desktop\download\msvcr80.dll" @copy openssl.exe "C:\Documents and Settings\%user%\Desktop\download\openssl.exe" @copy ssleay32.dll "C:\Documents and Settings\%user%\Desktop\download\ssleay32.dll" @copy wget.exe "C:\Documents and Settings\%user%\Desktop\download\wget.exe" cd C:\Documents and Settings\%user%\Desktop\download\ wget --no-cache --no-clobber --tries 3 --user-agent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1" ****************/winget/get_installers.php?build=true ren "get_installers.php@build=true" "download.bat" download.bat The six copy statements make a copy of wget to the current user's desktop. If anyone wants help me out with this project or is interested in the concept, please email me at wintallo@gmail.com. EDIT: by the way, if anyone would like to see my script in action, message me. Thanks!


×
×
  • Create New...