Jump to content

File Install


Skrip
 Share

Recommended Posts

  • Replies 48
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

You are running your script under Windows Vista. Did you try adding #RequireAdmin at the begining of your scrip?

Help File

#RequireAdmin

This function was primarily aimed at allowing AutoIt scripts to work correctly with Windows Vista User Account Control (UAC) (However, will also work on Windows 2000 and Windows XP).

AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
Link to comment
Share on other sites

I remember that Vista wouldn't even let me put a file in the root of C: using a file commander program. I think it has to do with the "improved security". It would let me create a new folder in the root and then copy the file into the folder, just not directly to "c:\". I won't be near a Vista machine until tomorrow, but I can do some testing to verify then...

Link to comment
Share on other sites

  • 2 weeks later...

Alright. To use File..anything. You NEED #RequireAdmin.

What version of Vista are you using? My brother has Vista and it uses C:\Documents and settings

Vista Home Premium

------

$reg = RegRead("HKCU\Antrix\", "First_Run")
    If @error Then
        #RequireAdmin
        Sleep(100)
    EndIf

Hmm..How come it always requires admin? I've got a function that adds the reg in after it checks this. Also, I checked the reg. It does exist.

Edited by Firestorm

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Link to comment
Share on other sites

  • Moderators

Bump. Please help.

Help with what? Looks like you got your answers, and as far as Vista... you're pretty much SOL.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

$reg = RegRead("HKCU\Antrix\", "First_Run")
    If @error Then
        #RequireAdmin
        Sleep(100)
    EndIf

Hmm..How come it always requires admin? I've got a function that adds the reg in after it checks this. Also, I checked the reg. It does exist.

That is what I need help with. I don't understand why it always activactes the #RequireAdmin...There should be NO error given. There is no error given. Edited by Firestorm

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Link to comment
Share on other sites

  • Moderators

That is what I need help with. I don't understand why it always activactes the #RequireAdmin...There should be NO error given. There is no error given.

You can't set #RequireAdmin as a condition. That's like trying to have an #include as a condition... it's already set regardless before you start your script.

One option you could do is make an Alternate script and use /AutoIt3ExecuteScript if there is an error to do what you are wanting.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • 2 weeks later...

Nope, found the same bug.

Here is some info.

Vista uses virtual folders. c:\users is the same as c:\documents and settings

This causes HUGE problems when people try Vista and then go back to good ol XP.. Most just format because they do not know about it.. (docs and sett and other stuff get messed up).. Read my post on sysinternals.com for more info.

Vista wont let scripts or compiled programs copy anywhere but a few select places, My Documents, Desktop etc... You can test by coping an EXE to various folders and if you don't get a security prompt from THE most ANNOYING fricken thing in the world! UAC Then your fine.

The problem with fileinstall is on both Vista and XP, it's a problem with fileinstall.

Even using old N safe DOS style names, it's funky..

fileinstall("C:\DOCUME~1\ALLUSE~1\dekstop\anyfile.txt" , "C:\DOCUME~1\ALLUSE~1\dekstop\anyfile2.txt")

does not work

fileinstall("C:\anyfile.txt" , "C:\DOCUME~1\ALLUSE~1\dekstop\anyfile2.txt")

does not work

fileinstall("C:\anyfile.txt" , "C:\anyfile2.txt")

does work

I am sure you can get away with one layer deep in the folders, but that will not help the poor victims of UAC!

As a matter of fact, the only thing stopping me from introducing a cure to UAC and announcing my program, is this error in AutoIT.

You see, I figured out a way to turn off UAC without ANY raised privileges or elevated this or that. Just a simple run, run from the web, and UAC is dead. :)

Something Microsoft has boasted that it could not be done. <_<

My intentions are not malicious, you'll see.

Link to comment
Share on other sites

  • Developers

Dekstop ?

ps.. removed the Bugreport since we don't accept reports like that ...

Edited by Jos

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

Dekstop ?

ps.. removed the Bugreport since we don't accept reports like that ...

I will post the right way. <_<

Yes Desktop because that is one of the few places Vista with UAC enabled MAY allow an EXE to be copied to. (For sure the %currentuser%\desktop has permission but I did not test All users\desktop on one of our Vista boxes, but because file install is limited to c:\balbla\ and can not have a macro (@DesktopCommonDir or @DesktopDir) in the copy from part of the command, and if you do from a c:\temp to @DesktopDir, it does actually install the file onto the current user desktop on the XP laptop I am using right now, BUT, if renames the file "@DesktopDirYOURPROGRAM.exe", yes it adds, @DesktopDir, to the front!) :):)

So, with the fileinstall bug, + Vista's stupid UAC, I was trying strange places like desktop.. :P

BTW, who was first? AHK or AutoIT?

They both seem very alike and each has their good and bad.

Edited by dewild1
Link to comment
Share on other sites

  • Developers

I will post the right way. <_<

Yes Desktop because that is one of the few places Vista with UAC enabled MAY allow an EXE to be copied to. (For sure the %currentuser%\desktop has permission but I did not test All users\desktop on one of our Vista boxes, but because file install is limited to c:\balbla\ and can not have a macro (@DesktopCommonDir or @DesktopDir) in the copy from pare of the command, and I found that you need to install from and to the same dir or it does not work, and if you do from a c:\temp to @DesktopDir, it does actually install the file onto the current user desktop on the XP laptop I am using right now, BUT, if renames the file "@DesktopDirYOURPROGRAM.exe", yes it adds, @DesktopDir, to the front!) :):)

So, with the fileinstall bug, + Vista's stupid UAC, I was trying strange places like desktop.. :P

but the shown post states "dekstop" NOT "desktop" ... so my question was: did you use dekstop which likely doesn't exists?

BTW, who was first? AHK or AutoIT?

They both seem very alike and each has their good and bad.

Search and thou shall find because enough was said about it all ... any discussions will be close on this subject .... Edited by Jos

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

but the shown post states "dekstop" NOT "desktop" ... so my question was: did you use dekstop which likely doesn't exists?

Search and dow shall find because enough was said about it all ... any discussions will be close on this subject ....

Ohh, LOL, do I FEEL special, special ed type of special.

Unce i cold nto speeel dixlezic, nwo i iz une.

<_< Gettin old, need new glasses.

Link to comment
Share on other sites

  • Developers

I just did Ctrl Z a hundred times, LOL, yep, I am stupid. :)<_<

But the rename the file "@DesktopDirYOURPROGRAM.exe", is still an issue.

Have you read my reply to your BUG report I locked ?

Jos

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

@DesktopDir is a macro therefore it does not get enclosed in the quotes. It also does not include the trailing backslash (as pointed out in the help file). So as Jos said (a couple of times) you want

@DesktopDir & "\YourProgram.exe"

Edit: I should also point out that this is a bug in your code NOT AutoIt and as such does not belong in the AutoIt Bug Reports forum. That is not for reporting bugs in your code.

Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

almost all of the autoit scripts I've written require the admin boost to work in vista. either that or disabling uac. btw you can disable uac by press the windows key + r (to get run box) and use msconfig > tools > disable uac.... for those who don't know.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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