tonycst Posted August 28, 2013 Share Posted August 28, 2013 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. Link to comment Share on other sites More sharing options...
Administrators Jon Posted August 28, 2013 Administrators Share Posted August 28, 2013 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. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
tonycst Posted August 28, 2013 Author Share Posted August 28, 2013 (edited) 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 August 28, 2013 by tonycst Link to comment Share on other sites More sharing options...
Developers Jos Posted August 28, 2013 Developers Share Posted August 28, 2013 What do you see CMD window when you remove the @SW_HIDE and replace /c for /k in the commandline? 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 More sharing options...
tonycst Posted August 28, 2013 Author Share Posted August 28, 2013 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. Link to comment Share on other sites More sharing options...
tonycst Posted August 28, 2013 Author Share Posted August 28, 2013 (edited) 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 August 28, 2013 by tonycst Link to comment Share on other sites More sharing options...
Developers Jos Posted August 28, 2013 Developers Share Posted August 28, 2013 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 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...
Mat Posted August 28, 2013 Share Posted August 28, 2013 I've been using AutoIt on a windows 8 laptop and I've had no issues so far. AutoIt Project Listing Link to comment Share on other sites More sharing options...
tonycst Posted August 28, 2013 Author Share Posted August 28, 2013 (edited) 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 August 28, 2013 by tonycst Link to comment Share on other sites More sharing options...
lpdl Posted August 28, 2013 Share Posted August 28, 2013 (edited) 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 August 28, 2013 by lpdl Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted August 28, 2013 Moderators Share Posted August 28, 2013 (edited) 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 August 28, 2013 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
lpdl Posted August 28, 2013 Share Posted August 28, 2013 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 Link to comment Share on other sites More sharing options...
tester123 Posted August 28, 2013 Share Posted August 28, 2013 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 Link to comment Share on other sites More sharing options...
Administrators Jon Posted August 28, 2013 Administrators Share Posted August 28, 2013 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. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
tonycst Posted August 28, 2013 Author Share Posted August 28, 2013 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. 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