Jump to content
Sign in to follow this  
tonycst

Am i screwed with windows 8 ?

Recommended Posts

tonycst

None of my scripts work with windows 8.

File are not copied. Registry file are not exported using cmd commands in autoit script.

Folders are not removed etc. I have no clue how many more problems all of my scripts have, but it seems to have something to do with windows 8 permissions.

I have fresh install of windows 8 (not pro) Default user is in admimistrators group (from what i understand) but even if i enable administrator account, scripts still fail to work.

Running scripts as administrator will export registry files but into system32 folder :(

Even making a batch file with regedit /e file.reg "key" will not export the key, it will only export it if i right click to run as administrator, and it will export it into system32 folder.

 

What is wrong. How do you guys deal with this ?

Is there something i need to modify my scripts with to make it work ?

Do i need to recompile them all or what ?

 

Please help.

Thanks a bunch.

Share this post


Link to post
Share on other sites
Jon

This isn't a Windows 8 thing, it's been like that since Vista (by default).

Any script that writes outside of your user profile (program files, system32, c: etc) will need to run as a full admin.  Add #requireadmin at the top of your script.

Share this post


Link to post
Share on other sites
tonycst

Nope. Still not a single file was copied.

I also noticed that i have to specify exe everytime i compile the script, otherwise its not created.

Strange. I have had nothing but trouble with windows 8 this whole week. Windows 7 had none of those issues, all of my scrits were created with windows 7 and all of them work.

Script uses CMD to copy files from @username folders

For example:

RunWait (@ComSpec & ' /c xcopy /E/D/Y "' & $LocalDir & '" "' & $BackupFolder & 'Local"',@ScriptDir,@SW_HIDE)

Edited by tonycst

Share this post


Link to post
Share on other sites
tonycst

i see error saying Invalid Drive specification.

I found the problem that did not exist in windows 7

Problem is that Globaly decalred variable are not working in a separate files of the script.

I have each function in its own file.au3 that starts with
Global $PathVar

$PathVar is created in main script and is declared as Global variable. I dont understand why its not passed to function as it was back in windows 7.

Share this post


Link to post
Share on other sites
tonycst

I have AutoIt Version: 3.3.6.1.

My script is looking for OS version to provide correct path to folders to xcopy.

@OSversion returns unknown.

I added Win_8 but i guess i need to update to newer version of autoit :(

That solves this problem, but how about using CMD.bat files ? I have lots of scripts that are written in command prompt that dont work.

Becoming Administrator does not have any effect :( as if Administrator account has no adinistrative rights or they act different from windows 7.

Thought W8 was built on W7 core.

Thanks.

Edited by tonycst

Share this post


Link to post
Share on other sites
Jos

That solves this problem, but how about using CMD.bat files ? I have lots of scripts that are written in command prompt that dont work.

Becoming Administrator does not have any effect :( as if Administrator account has no adinistrative rights or they act different from windows 7.

Thought W8 was built on W7 core.

Thanks.

We will need more debug info to be able to help you.

Show something short and sweet that has issues..

Jos


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
tonycst

Well at this point (now that i updated autoit and added WIN_8 to my script) things work.

NOt sure if i should continue discussing windows 8 problems, but here is a line that does not work for me

regedit /e ALOptions.reg "HKEY_CURRENT_USERSoftwareAdvanced Launcher"

It supose to export reg file into current directory but ir doesnt. it will do it when ran as administrator but in that case it will export it to system32 folder.

I can run same thing in autoit with #requireadmin and it works.

#RequireAdmin
RunWait (@ComSpec & ' /k regedit /e ALOptions.reg "HKEY_CURRENT_USERSoftwareAdvanced Launcher"') but it just proves to me that somethinn is wring with permissions in windows 8 because in W7 i didnt have that problem.

 

 

Knowing this problem exists, i suspect that many of my autoit scripts will have same issues becase most of them usilize xcopy since autoit does not have xcopy. I just have to add #requireadmin to all of them :(

Speaking of which, does new autoit version has anything similar to xcopy ? That be awesoe.

Edited by tonycst

Share this post


Link to post
Share on other sites
lpdl

Hello,

I've similar problem, I wrote this simple script in windows 8

 

#RequireAdmin

ShellExecute("C:\Windows\System32\dccw.exe")
While 1
  if Winactive("Calibrazione colori schermo") = 0  Then
   Winactivate("Calibrazione colori schermo")
  Endif
ControlClick("Calibrazione colori schermo","","[TEXT:&Avanti]")
  ControlClick("Calibrazione colori schermo","","[TEXT:&Avanti]")
  WinClose("Calibrazione colori schermo")
  ProcessClose("autoit.exe")
Wend

 

this script works when I run it in scite* with "TOOLS-> GO" but it only opens dccw.exe when I double click on .exe file I built...

*(I'm a goat with english and I wrote shite.insttead of scite.I'm Sorry)

Edited by lpdl

Share this post


Link to post
Share on other sites
JLogan3o13

 

this script works when I run it in shite with "TOOLS-> GO" but it only opens dccw.exe when I double click on .exe file I built...

 

   I will say to begin with that you won't get much help by badmouthing the tools. You can't expect us to believe that was a typo.

Edit: Benefit of the doubt, I guess :)

Edited by JLogan3o13

√-1 2^3 ∑ π, and it was delicious!

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites
lpdl

   I will say to begin with that you won't get much help by badmouthing the tools. You can't expect us to believe that was a typo.

 

I think it's clear it was only a "typo", anyway, I'm sorry, I didn't want hurt none

Share this post


Link to post
Share on other sites
tester123

I've used AutoIt script on Microsoft's Surface Pro tablet running on Windows 8 and on Panasonic's roughbook (touchbook) on Windows 8. Thankfully, both work fine for me :)

Share this post


Link to post
Share on other sites
Jon

 but it just proves to me that somethinn is wring with permissions in windows 8 because in W7 i didnt have that problem.

 

I'd put money on the fact that your Windows 7 machine had UAC disabled, which is not the default.  Vista/7/8 all work identically in this respect.

On your Windows 7 machine just run "regedit.exe" - if you don't get a UAC popup then UAC is disabled.

You should always code your scripts, especially those others will use, so they work in a UAC enabled environment which is what you are seeing now in Windows 8. It's why #requireadmin exists.

Share this post


Link to post
Share on other sites
tonycst

Yes my UAC is disabled. I didnt know that #requireadmin has effect on UAC, i thought it only gives script administrative execution level, kinda like Run as Administrator, but in that case working directory is not changed to system32.

It kinda sucks that i cant just enable windows 8 administrator and use it all the time, METRO will not work as intended (from what i understand apps wont work or purchase):( Oh well.

Thanks. Thats why i love to come here. Someone will always make it clear.

Share this post


Link to post
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
Sign in to follow this  

×