Trong Posted August 19, 2015 Share Posted August 19, 2015 My script is no longer working on Windows 10, although it still works fine on XP, Win7,8, 8.1.Please help script works on Windows 10. Regards, Link to comment Share on other sites More sharing options...
Danyfirex Posted August 19, 2015 Share Posted August 19, 2015 So where is your code? Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
Trong Posted August 20, 2015 Author Share Posted August 20, 2015 (edited) If $IsNewOS Then $DocumentsDir = @UserProfileDir & "\Documents" Else $DocumentsDir = @UserProfileDir & "\My Documents" EndIf Local $KEY_Explorer = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer" RegWrite($KEY_Explorer & "\User Shell Folders", "Personal", "REG_EXPAND_SZ", $DocumentsDir) RegWrite($KEY_Explorer & "\User Shell Folders", "My Video", "REG_EXPAND_SZ", $DocumentsDir & "\Videos") RegWrite($KEY_Explorer & "\User Shell Folders", "My Music", "REG_EXPAND_SZ", $DocumentsDir & "\Music") RegWrite($KEY_Explorer & "\User Shell Folders", "My Pictures", "REG_EXPAND_SZ", $DocumentsDir & "\Pictures") RegWrite($KEY_Explorer & "\User Shell Folders", "Favorites", "REG_EXPAND_SZ", $DocumentsDir & "\Favorites") RegWrite($KEY_Explorer & "\User Shell Folders", "{BFB9D5E0-C6A9-404C-B2B2-AE6DB6AF4968}", "REG_EXPAND_SZ", $DocumentsDir & "\Links") RegWrite($KEY_Explorer & "\User Shell Folders", "{7D1D3A04-DEBB-4115-95CF-2F29DA2920DA}", "REG_EXPAND_SZ", $DocumentsDir & "\Searches") RegWrite($KEY_Explorer & "\User Shell Folders", "{56784854-C6CB-462B-8169-88E350ACB882}", "REG_EXPAND_SZ", $DocumentsDir & "\Contacts") RegWrite($KEY_Explorer & "\User Shell Folders", "{374DE290-123F-4565-9164-39C4925E467B}", "REG_EXPAND_SZ", $DocumentsDir & "\Downloads") RegWrite($KEY_Explorer & "\User Shell Folders", "{4C5C32FF-BB9D-43B0-B5B4-2D72E54EAAA4}", "REG_EXPAND_SZ", $DocumentsDir & "\Saved Games") RegWrite($KEY_Explorer & "\User Shell Folders", "{1B3EA5DC-B587-4786-B4EF-BD1DC332AEAE}", "REG_EXPAND_SZ", $DocumentsDir & "\Libraries") RegWrite($KEY_Explorer & "\Shell Folders", "Personal", "REG_SZ", $DocumentsDir) RegWrite($KEY_Explorer & "\Shell Folders", "My Video", "REG_SZ", $DocumentsDir & "\Videos") RegWrite($KEY_Explorer & "\Shell Folders", "My Music", "REG_SZ", $DocumentsDir & "\Music") RegWrite($KEY_Explorer & "\Shell Folders", "My Pictures", "REG_SZ", $DocumentsDir & "\Pictures") RegWrite($KEY_Explorer & "\Shell Folders", "Favorites", "REG_SZ", $DocumentsDir & "\Favorites") RegWrite($KEY_Explorer & "\Shell Folders", "{BFB9D5E0-C6A9-404C-B2B2-AE6DB6AF4968}", "REG_SZ", $DocumentsDir & "\Links") RegWrite($KEY_Explorer & "\Shell Folders", "{7D1D3A04-DEBB-4115-95CF-2F29DA2920DA}", "REG_SZ", $DocumentsDir & "\Searches") RegWrite($KEY_Explorer & "\Shell Folders", "{56784854-C6CB-462B-8169-88E350ACB882}", "REG_SZ", $DocumentsDir & "\Contacts") RegWrite($KEY_Explorer & "\Shell Folders", "{374DE290-123F-4565-9164-39C4925E467B}", "REG_SZ", $DocumentsDir & "\Downloads") RegWrite($KEY_Explorer & "\Shell Folders", "{4C5C32FF-BB9D-43B0-B5B4-2D72E54EAAA4}", "REG_SZ", $DocumentsDir & "\Saved Games") RegWrite($KEY_Explorer & "\Shell Folders", "{1B3EA5DC-B587-4786-B4EF-BD1DC332AEAE}", "REG_SZ", $DocumentsDir & "\Libraries") ReStarExplorer() Edited August 20, 2015 by Trong Regards, Link to comment Share on other sites More sharing options...
Danyfirex Posted August 20, 2015 Share Posted August 20, 2015 Use @MyDocumentsDir instead your way. Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
Trong Posted August 20, 2015 Author Share Posted August 20, 2015 You do not understand my question?I do not find it, because I know how to take it. I need to change it. OK? Regards, Link to comment Share on other sites More sharing options...
tonycst Posted August 20, 2015 Share Posted August 20, 2015 I too find issues with having my scripts work under Windows 10I think we both have Administrator accounts ?That could be part of the problem because allot of Windows stuff is actually APPs that dont work unless you are a regular user.Kinda sucks but i think nerds are screwed and gonna go back to W7 Let me know what u fin dout. Try normal user. Link to comment Share on other sites More sharing options...
Trong Posted August 20, 2015 Author Share Posted August 20, 2015 Administrator or Normal user is not working.I have tried but failed.Currently I still have to change manually. Regards, Link to comment Share on other sites More sharing options...
BrewManNH Posted August 20, 2015 Share Posted August 20, 2015 Look in the registry for the ShellFolders entries, there's a registry key called "!Do not use this registry key" and directs you to "Use the SHGetFolderPath or SHGetKnownFolderPath function instead". That tells me that Windows 10 doesn't use these as anything other than pointers for other programs to use, if you want to set them you should probably be using SHSetKnownFolderPath to change them. Trong 1 If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
tonycst Posted August 21, 2015 Share Posted August 21, 2015 OK i am now totally confused with this guy.So your script cant see UserProfileDir & "\Documents" ?$result = FileExists (@UserProfileDir & "\Documents") MsgBox (0,'',$result)returns 1 so it works.I dontk now what does$IsNewOSstands for and how its implemented into your script.You are asking for answer of a question you never asked. Link to comment Share on other sites More sharing options...
Trong Posted August 21, 2015 Author Share Posted August 21, 2015 @tonycst: Do not care to this code, it's just a part of my program. ; $IsNewOS = FuncCheckOS() ; Set MyDocument Path for restore. If $IsNewOS Then $DocumentsDir = @UserProfileDir & "\Documents" Else $DocumentsDir = @UserProfileDir & "\My Documents" EndIf@KingBob: I will learn how to use it: SHSetKnownFolderPath Regards, Link to comment Share on other sites More sharing options...
ViciousXUSMC Posted August 21, 2015 Share Posted August 21, 2015 Hmm what about a symlink? Thats how I did this kind of stuff long ago when SSD were still small. Link to comment Share on other sites More sharing options...
Trong Posted August 22, 2015 Author Share Posted August 22, 2015 I don't know. What is symlink ? How do I change the path of Document automatically with AutoIt? Regards, 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