Jump to content

Am i screwed with windows 8 ?


Recommended Posts

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

  • Administrators

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.

Link to comment
Share on other sites

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

  • Developers

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

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

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

  • Developers

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

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

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

  • Moderators

 

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

"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

   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

  • Administrators

 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.

Link to comment
Share on other sites

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

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