zamboni128 0 Posted January 8, 2011 I'm trying to write a script that will change the label on the desktop computer icon to the computer name. The following vbs script works and i'm trying to convert it to autoit. ---VBS--- Dim objShell Dim objFolder Dim objFolderItem Const MY_COMPUTER = &H11& Set objShell = CreateObject("Shell.Application") Set objFolder = objShell.Namespace(MY_COMPUTER) Set objFolderItem = objFolder.Self objFolderItem.Name = "test" ---VBS--- I've researched and tried the following autoit script but it does not work on windows 7 because of registry permissions (?) RegWrite ("HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}", "LocalizedString", "REG_SZ", "test") Can anyone help me convert the VBS script to AutoIT? Thanks in advance Share this post Link to post Share on other sites
Mat 376 Posted January 8, 2011 It's simple as we can use objects too All you need to do is change the syntax slightly. Global Const $MY_COMPUTER = 0x11 Local $objShell = ObjCreate("Shell.Application") Local $objFolder = $objShell.Namespace($MY_COMPUTER) Local $objFolderItem = $objFolder.Self $objFolderItem.Name = "Test Computer" AutoIt Project Listing Share this post Link to post Share on other sites
zamboni128 0 Posted January 8, 2011 Thank you very much for the information and fast reply. Share this post Link to post Share on other sites
zamboni128 0 Posted January 8, 2011 It's simple as we can use objects too All you need to do is change the syntax slightly. Global Const $MY_COMPUTER = 0x11 Local $objShell = ObjCreate("Shell.Application") Local $objFolder = $objShell.Namespace($MY_COMPUTER) Local $objFolderItem = $objFolder.Self $objFolderItem.Name = "Test Computer" Is there a place i can look at that will tell me all the methods available for an object? Another-words, how do I know i can use .Self as a method for the above object? This is probably a basic question so thanks for your patience. Share this post Link to post Share on other sites