Jump to content

Ok someone helped me out with a script and it worked yesterday but not today?


2paulm
 Share

Recommended Posts

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

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

That 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 by exolon
Link to comment
Share on other sites

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 enabled

thanks

Paul

Link to comment
Share on other sites

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

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 Gude
How 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...