
john123
Active Members-
Posts
34 -
Joined
-
Last visited
Everything posted by john123
-
Hello everyone! I use _IniReadSectionEx() but get error : Array variable has incorrect number of subscripts or subscript dimension range exceeded. Please help me fix it. This take me two days but without success. Thanks for your help!
-
Hi MadBoy! Thank you, your code is wonderfull. With SetupCopyOEMinf method, i get popup "Files needed", it show below: Type the path where is file located... Copy file from:... And when I browser to *.sys file, press "Ok", it still don't except this file. When I use SetupCopyOEMinf.exe, everything OK. What's the problem? I think you check again parameter in Dllcall(): $dll_result = DllCall($dll_exe, "int", "SetupCopyOEMInf", "str", $full_path_to_inf, "str", "", "int", 1, "int", 8, "str", "", "int", 0, "int", 0, "str", "") Thank you!
-
Search subfolder name exactly!
john123 replied to john123's topic in AutoIt General Help and Support
Thanks funke Have a nice day! Hapy Chrismas to forum! -
Search subfolder name exactly!
john123 replied to john123's topic in AutoIt General Help and Support
Thank you so much. But I want search R1, T1 from "C:\Drv". Like this: #include <Array.au3> Func _SearchDir($start_dir) Local $dir = $start_dir & '\*.*' Local $search = FileFindFirstFile($dir) While 1 $next = FileFindNextFile($search) If @error Then ExitLoop If StringInStr(FileGetAttrib($next & "\" & $search), "D") Then _SearchDir($next & "\" & $search) Else $next = $next & '\' $search EndIf WEnd EndFunc Can you improve this code? Can get C:\Drv\D\S\R1, C:\Drv\D\W\T1, ... from C:\Drv (remove C:\Drv\D\S, C:\Drv\D, C:\Drv\D\W, C:\Drv\D from the result)? With _FileListToArray("C:\Drv", "*", 2), it don't remove C:\Drv\D\S, C:\Drv\D, C:\Drv\D\W, C:\Drv\D. -
Hi everyone! I hava folder Drv as below: C:\Drv\D\S\R1\*.* C:\Drv\D\W\T1\*.* .... How to search subfolder name that the result return as : C:\Drv\D\S\R1 C:\Drv\D\W\T1 not: C:\Drv\D C:\Drv\D\S C:\Drv\D\S\R1 C:\Drv\D\W C:\Drv\D\W\T1 (remove C:\Drv\D, C:\Drv\D\S, C:\Drv\D\W from result) I want search folder and add path driver folder to DevicePath in registry. Thanks so much.
-
Hello everyone! I search google and get below code in VC++ to disable driver unsigning, it work well. Can anybody convert it to AutoIT3? Thanks for you help! #include <windows.h> #include <wincrypt.h> #include <stdio.h> #define HP_HASHVALUE HP_HASHVAL //* This program turns the Driver signing Policy On/Off for Windows XP */ // * Written by Stefan 'Sec' Zehl <sec@xxxxxx>, 15.11.2004 // * // * Thanks to sysinternals.com for regmon and apispy // * to msdn.microsoft.com for windows reference // * to cygwin for their environment // * void MyHandleError(char *s){ printf("Error: %s, number %x\n.",s,(unsigned int)GetLastError()); exit(1); } //-------------------------------------------------------------------- int main(void){ HCRYPTPROV hCryptProv; HCRYPTHASH hHash; BYTE data[16]; DWORD len; DWORD seed; HKEY hkey; BYTE onoff=0; // This is the On/Off toggle char input[4]; int x; // HKLM\System\WPA\PnP\seed if(RegOpenKeyEx( HKEY_LOCAL_MACHINE, "System\\WPA\\PnP", 0, KEY_READ, &hkey )==ERROR_SUCCESS){ printf("RegOpenKey sucess\n"); }else{ printf("RegOpenKey failure\n"); }; len=sizeof(seed); if(RegQueryValueEx( hkey, "seed", NULL, NULL, (BYTE*)&seed, &len )==ERROR_SUCCESS){ printf("RegQueryValue sucess\n"); }else{ printf("RegQueryValue failure\n"); }; if(hkey) RegCloseKey(hkey); printf("Seed=%x\n",(unsigned int)seed); printf("Hello, World\n"); if(CryptAcquireContext( &hCryptProv, NULL, NULL, PROV_RSA_FULL, // 0)) CRYPT_VERIFYCONTEXT)) { printf("CryptAcquireContext complete. \n"); } else { MyHandleError("Acquisition of context failed."); } //-------------------------------------------------------------------- // Create a hash object. if(CryptCreateHash( hCryptProv, CALG_MD5, 0, 0, &hHash)) { printf("An empty hash object has been created. \n"); } else { MyHandleError("Error during CryptBeginHash!\n"); } //-------------------------------------------------------------------- // Compute the cryptographic hash on the data. input[0]=0; input[1]=onoff; // This is the Value! input[2]=0; input[3]=0; if(CryptHashData( hHash, input, sizeof(input), 0)) { printf("The data has been hashed. \n"); } else { MyHandleError("Error during CPHashData!\n"); } //-------------------------------------------------------------------- if(CryptHashData( hHash, (BYTE*)&seed, sizeof(seed), 0)) { printf("The data has been hashed. \n"); } else { MyHandleError("Error during CPHashData!\n"); } //-------------------------------------------------------------------- len=sizeof(data); if( CryptGetHashParam( hHash, HP_HASHVALUE, data, &len, 0)) { printf("The hash has been retrieved. \n"); } else { MyHandleError("Error during CPGetHashParam!\n"); } //-------------------------------------------------------------------- // Clean up. // Destroy the hash object. if(hHash) { if(!(CryptDestroyHash(hHash))) MyHandleError("Error during CryptDestroyHash"); } // Release the CSP. if(hCryptProv) { if(!(CryptReleaseContext(hCryptProv,0))) MyHandleError("Error during CryptReleaseContext"); } printf("Hash: "); for(x=0;x<sizeof(data);x++){ printf("%x ",data[x]); }; printf("\nCreate md5 hash completed without error. \n"); //-------------------------------------------------------------------- // HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\PrivateHash if(RegOpenKeyEx( HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion\\Setup", 0, KEY_WRITE, &hkey )==ERROR_SUCCESS){ printf("RegOpenKey sucess\n"); }else{ printf("RegOpenKey failure\n"); }; len=sizeof(seed); if(RegSetValueEx( hkey, "PrivateHash", 0, REG_BINARY, data, sizeof(data) )==ERROR_SUCCESS){ printf("RegSetValueEx sucess\n"); }else{ printf("RegSetValueEx failure\n"); }; if(hkey) RegCloseKey(hkey); //-------------------------------------------------------------------- // HKLM\Software\Microsoft\Driver Signing\Policy if(RegOpenKeyEx( HKEY_CURRENT_USER, "Software\\Microsoft\\Driver Signing", 0, KEY_WRITE, &hkey )==ERROR_SUCCESS){ printf("RegOpenKey sucess\n"); }else{ printf("RegOpenKey failure\n"); }; len=sizeof(seed); if(RegSetValueEx( hkey, "Policy", 0, REG_BINARY, &onoff, 1 )==ERROR_SUCCESS){ printf("RegSetValueEx sucess\n"); }else{ printf("RegSetValueEx failure\n"); }; if(hkey) RegCloseKey(hkey); //-------------------------------------------------------------------- // HKLM\Software\Microsoft\Driver Signing\Policy if(RegOpenKeyEx( HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Driver Signing", 0, KEY_WRITE, &hkey )==ERROR_SUCCESS){ printf("RegOpenKey sucess\n"); }else{ printf("RegOpenKey failure\n"); }; len=sizeof(seed); if(RegSetValueEx( hkey, "Policy", 0, REG_BINARY, &onoff, 1 )==ERROR_SUCCESS){ printf("RegSetValueEx sucess\n"); }else{ printf("RegSetValueEx failure\n"); }; if(hkey) RegCloseKey(hkey); exit(0); }
-
Thank you. Have any the way to fix this? Please help me. Thanks so much.
-
Hi everyone! I use IniReadSection to read a .ini file. In this file have one section and 1000 key, the number of key return only 537. Example: #include <Array.au3> $section = IniReadSection("c:\test.ini", "backup") msgbox(0,"results", $section[0][0]) test.ini: [backup] key1=xxx key2=yyy ........ key537=hhh key538=ttt ........ key1000=zzz The result I get : 537 key The result only true if number of key < 537, With 538 or higher, to 1000 key, the result still: 537 Please help me get all key in test.ini file, what's problem this? Thank you for your help.
-
remove Minimize and Restore on windows bar?
john123 replied to john123's topic in AutoIt GUI Help and Support
Thank you very much. -
Hello evrybody! Please help create a GUI with only Close button, with out Minimize and Restore button on windows bar. Thank you!
-
Thanks Melba23, I am looking for this. Thank you very much.
-
Thanks kaotkbliss so much. Code works well. I've lost 3 days for this. You are my hero. Thanks again.
-
Hello everyone! Please help me create loading label with dot, like this: Loading... with dot (".") repeat from 1 to 3, as below: Loading. Loading.. Loading... I have search but no result. Thank you so much.
-
Hi everyone! I have a script with GUI, while run script, I use hot key to exit script. The script exit but it still run in task manager. My hot key: HotKeySet("^!x",_quit()) ;script here Func _quit() Exit 0 EndFunc Please help me how to kill it in task manager. Thanhks for your help.
-
Hi everybody! Please help me write code to detect "R2" in windows server 2003 R2 enterprise with GetSystemMetrics function. I have infomations about it here : http://msdn.microsoft.com/en-us/library/ms724833%28VS.85%29.aspx GetSystemMetrics(SM_SERVERR2) != 0 ====> Windows Server 2003 R2 (How to get it via autoit?) Thanks for your help. Thanks so much.
-
Exit script if ECS key was pressed in 10 seconds
john123 replied to john123's topic in AutoIt General Help and Support
Thank you.Thanks you so much. -
How to match white space with StringRegExp
john123 replied to john123's topic in AutoIt General Help and Support
Thank you so much. -
How to match white space with StringRegExp
john123 posted a topic in AutoIt General Help and Support
Hi everybody. Please help me the way to match white space and "?" character with StringRegExp to check a value in input box. Exam (value in input box): useraccount ===> valid user account ===> not valid or useracc ount ===> not valid useraccount? ===> not valid Thanks very much. -
Thanks Trancexx. I've just tested. I got error message : 0x8004100A. Perhap WMI don't run until full operating system installed (for user account, don't include SYSTEM account). I really need phrase "Microsoft windows xp professional" to make a label on my application, this application run after mini-setup. How can fix this error?.
-
Hi Authenticity and everyone. I complie two script above. I run mini-setup with sysprep.exe and add them to sysprep.inf (run after mini-setup - with Runonce). The second script run fine but first script don't run. I think first script don't work with SYSTEM account (after mini-setup, windows login as System account). Can you explain about this problem? Sorry for bother. Thank you so much.
-
Help me remove background color icon on tab.
john123 replied to john123's topic in AutoIt GUI Help and Support
Thank you very much. Have a nice day.