2paulm Posted September 18, 2011 Share Posted September 18, 2011 This might sound strange but I need and exe file to open a URL and download another exe file the point is it needs to appear as the exe file is hosted on my server by running and downloading a exe from a seperate server this code worked fine yesterday #NoTrayIcon#include <IE.au3>$URL = "http://noname.paretologic.revenuewire.net/pcha/download"InetGet($URL, @TempDir & "\ParetoLogic PC Health Advisor.exe")Run(@TempDir & "\ParetoLogic PC Health Advisor.exe")Exit and when I tried it again today I get nothing? Does anyone have any thoughts? Paul Link to comment Share on other sites More sharing options...
Developers Jos Posted September 18, 2011 Developers Share Posted September 18, 2011 Are you sure there is no filename in the url needed? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
2paulm Posted September 19, 2011 Author Share Posted September 19, 2011 no that url initiated the download of a file with the name seen in the code it worked for me exactly how it looks and then all of a sudden doesnt work can't figure it out. could be a secuirty setting on my machine I dont know Paul Link to comment Share on other sites More sharing options...
Developers Jos Posted September 19, 2011 Developers Share Posted September 19, 2011 Just try adding the filename to the url. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Valuater Posted September 19, 2011 Share Posted September 19, 2011 Spaces in the exe/location name can cause problems 8) Link to comment Share on other sites More sharing options...
exolon Posted September 19, 2011 Share Posted September 19, 2011 (edited) This might sound strange but I need and exe file to open a URL and download another exe file the point is it needs to appear as the exe file is hosted on my server by running and downloading a exe from a seperate serverThat does sound a bit strange. InetGet($URL, @TempDir & "\ParetoLogic PC Health Advisor.exe")What does this return?Does the file exist in the chosen location? Does your program have permissions to write there? Run(@TempDir & "\ParetoLogic PC Health Advisor.exe")If the file does end up there, can you run it by hand? Is it the right size?What does Run(...) return?Why didn't you extract the filename instead of duplicating the string constant and inviting the possibility of a typo (e.g. downloading "advisor.exe" and trying to run "adviser.exe")? Does anyone have any thoughts?Yeah, you need to test the individual pieces of your program and narrow down where the problem might be, rather than just thinking "it worked, now it doesn't work, what's wrong?" Try to figure out what parts work and what parts don't work. At what point in the program do the results deviate from what was expected? Print debug messages at various points in your program - maybe after every line here - printing the results of what you've tried to do. Edited September 19, 2011 by exolon Link to comment Share on other sites More sharing options...
2paulm Posted September 19, 2011 Author Share Posted September 19, 2011 Ok I have more info it worked the other day because User Account control was disabled ok it was a security issue if user account control is enabled it doesnt do anything and gives no warning if I disable user account control in msconfig tools disable UAC then it runs.. so is there a way to check if this is enabled and ask to allow the download? thanks for any info on this. I also noticed this uses internet explorer so if the person doesnt have explorer it wont work at all correct?can I make it prompt the user if the user account control is enabled or bypass this somehow?I disabled user account control and it works on my machine again ... but most people have this security setting enabledthanksPaul Link to comment Share on other sites More sharing options...
JohnOne Posted September 19, 2011 Share Posted September 19, 2011 You cannot bypass UAC. Add #RequireAdmin directive in script, and the user should be prompted to allow it. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
2paulm Posted September 19, 2011 Author Share Posted September 19, 2011 Your the bomb I added the #RequireAdmin and it seems to work now without any extra warnings. now to get back to the tweaking board thanks JohnOne and Valuter for all your help on this code.. now I want to add a message box during the delay that says loading so people will know its doing something I will figure this out myself I hope. Also is there a way to make it so its not an unknown publisher? just curious Paul Link to comment Share on other sites More sharing options...
2paulm Posted September 20, 2011 Author Share Posted September 20, 2011 One last thing I need to do to make this look a little better when it asks if I want to run the exe it says unknown publishers how can I set the publisher name? I tried some various settings but still says unknown publisher Paul Link to comment Share on other sites More sharing options...
BrewManNH Posted September 20, 2011 Share Posted September 20, 2011 You'd need a code signing certificate from a trusted source to bypass that. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
JohnOne Posted September 20, 2011 Share Posted September 20, 2011 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now