Jump to content

Works only when in .au3 form?


Recommended Posts

Hi all i have a script that works like a charm but as soon as i compile it, it does not work anymore

heres my code:

f Not FileExists("c:\windows\options\cabs") Then

Do

DirCreate("c:\windows\options\cabs")

Until FileExists("c:\windows\options\cabs")

EndIf

FileInstall("C:\Documents and Settings\Mike\Desktop\cabs\cabs\setup1.wav", "c:\windows\options\cabs", 0)

FileInstall("C:\Documents and Settings\Mike \Desktop\cabs\cabs\setup2.wav", "c:\windows\options\cabs", 0)

any clues?

thanks in advanced

Hard work never killed anyone but why take the chance?

Link to comment
Share on other sites

  • Developers

Try:

If Not FileExists("c:\windows\options\cabs") Then
   DirCreate("c:\windows\options\cabs")
EndIf
FileInstall("C:\Documents and Settings\Mike\Desktop\cabs\cabs\setup1.wav", "c:\windows\options\cabs\", 0)
FileInstall("C:\Documents and Settings\Mike \Desktop\cabs\cabs\setup2.wav", "c:\windows\options\cabs\", 0)

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

i still have not got it to work on my own, so any help would be greatly appreciated

thanks

mike

Try This:

If Not FileExists("c:\windows\options\cabs") Then
Do
DirCreate("c:\windows\options\cabs")
Until FileExists("c:\windows\options\cabs")
EndIf
FileInstall("C:\Documents and Settings\Mike\Desktop\cabs\cabs\setup1.wav", "c:\windows\options\cabs", 0)
FileInstall("C:\Documents and Settings\Mike\Desktop\cabs\cabs\setup2.wav", "c:\windows\options\cabs", 0)
Link to comment
Share on other sites

If Not FileExists("c:\windows\options\cabs") Then
DirCreate("c:\windows\options\cabs")
EndIf
FileInstall("C:\Documents and Settings\Mike\Desktop\cabs\cabs\setup1.wav", "c:\windows\options\cabs\", 0)
FileInstall("C:\Documents and Settings\Mike\Desktop\cabs\cabs\setup2.wav", "c:\windows\options\cabs\", 0)

Or this here, based off Jos'.

If you are running it on a Vista system make sure to put a #RequireAdmin at the top of your code.

Edit: there was a space in your second FileInstall line between Mike\Desktop.

Edited by schilbiz
Link to comment
Share on other sites

What is the error you are getting?

What os?

I am assuming you're running the compiled and non-compiled script on the same computer. If it works non-compiled then are you removing the files from the dest folder before running the compiled script?

You have overwrite flag off in your FileInstall statements.

Do the files exist in the folder "C:\Documents and Settings\Mike\Desktop\cabs\cabs".

Permissions?

I'm not at a machine right now that I can run a test script on so I'm kind of throwing some things out there.

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...