Sorry its because the whole cmd file was made to run from current directory.....the sfx file extracts to Temp folder so if ran from there the current directory is the Temp folder. The text file according to the vbs file echo's it will always write to Temp folder location. I didn't know how in vb scripting to write file to "%~dp0" (current directory). Sorry I was getting confused. lol Hope this clears things up for you. Update: I added "%~dp0" to vbs echo to replace the %Temp% location and it worked for finding the current directory but still only blank txt file. grrr lol I will work on this tomorrow if I have time. I am done for tonight. Its in the cmd file that the problem is arising...I am missing something because the other vbs files run so ... I have even tried turning off uac and that did not make any difference. Also tried adding admin rights to vbs file without success. Seems as if the vbs if ran from within the batch file cant transfer the key to the text file. If nothing else I will drop this registry key query for I have a complete vbs file for all system info so I don't really need it. vbs files are such a pain to run from a batch file and it isn't worth the headache since other tools can query the key.
View attachment OEM-CD.zip Spoiler IF EXISTS ".\QueryKey.vbs" (".\QueryKey.vbs") it's EXIST NBBBB-BBBB-BBBBB-BBBBB should be NBBBB-BBBBB-BBBBB-BBBBB-BBBBB (missing B in second group) IF EXIST ".\RegKey.txt" for /f "tokens=2 delims=:" %%A in ('find "-" .\RegKey.txt') do (set REGKEY=%%A) could be IF EXIST ".\RegKey.txt" for /f %%A in (RegKey.txt) do (set REGKEY=%%A) by removing "Installed Key:" & of vbs script and at final :LOOP phase, lines= should be 30 or 31 so OEM INFORMATION FOR THIS MACHINE appear
RegKey.txt file still empty on win 8.1. Think it is the save(data) in the vbs file that is the issue with win8.x. The vbs file runs obviously since the RegKey.txt file is created but seems it cant write to it to include the key in win 8.x. This is what I was saying earlier, what works in one OS might not work in another OS. I am dropping the installed key query because for the life of me and others it just wont work when running in a batch file. It has to do with the key saving the data in win 8.x so all this is doing is irritating me. I have tried multiple saving types all without success. You can click on the vbs file and it works correctly, just not ran from batch file. There are other tools if you need to know your install key in registry. We are done with this.
Unable to open registry key. If I click on your new vbs file (adding :: to stop deletion in cmd file) it opens window with key but nothing in cmd window about key. Any of these vbs files run when manually clicked...just not ran from cmd file. Win 8.x is stopping it even with uac turned off.
Cant get it to run correctly within a sfx file....that's the problem I found out in the end. I can run the cmd file myself with little editing from anywhere and click on cmd file and it works perfect. For some odd reason win 8.x doesn't like running certain cmds no matter if uac is off or on from sfx files. I decided to just drop it. I have a vbs file I created a while back that gets detailed info. This was just an added feature I was "trying" but did not succeed. skolar, can you share those 4 oems you found so I can add them to the project? I got the query tool to show service tag and that is all I am doing to that tool. I would like to add the other oems since Alphawaves new or should I say updated project will be released soon and would like to test the new oems with it. Thanks in advance.
have you tried any 3rd party cmdline tools to get the key and parse the file? something like nirsoft produkey. you can pipe the keys to a txt file Code: produkey.exe /WindowsKeys 1 /OfficeKeys 0 /IEKeys 0 /SQLKeys 0 /ExchangeKeys 0 /stab "" >> key.txt
Not going to add the installed registry key. Too much of a pain. The problem is the sfx file. I don't want to keep adding 3rd party tools....why not just use a 3rd tool to find out in the first place? lol Anyways this subject is history. Updated query tool and main project link on first post. The reason I use a sfx file in the first place is so anyone can update it if need be....I can use other methods but it would no longer be open source. In life, we have to take and give.
None of those methods work unfortunately. The problem I will say again is the sfx file in win 8.x.....windows will not allow it to run properly. Manually running the cmd prompt from temp directory works perfect like it should so it isn't the scripting but the sfx isn't allowed to run certain cmds. There is no solution to this other then me making the tool closed source to resolve it. So I will ask....do you all really want to close source this tool or leave it be and use above vbscript that I provided to look that up manually? It doesn't matter to me. Does anyone know how to create a sfx file using 7zip? I cant for the life of me find info online how to do it step by step. Would like to try it instead of WinRAR to see if problem is specific to WinRAR or all sfx's.
Release a closed source version while an open source at the same time well. Having both, people will have options to pick up the most convenient.
Doesn't matter what app you use to make sfx file....it will never run correctly in windows 8.x. Just tried 7zip and it also failed. Seriously ppl lets drop this.....its not possible with the current process. I know ppl want their cake and eat it also but that isn't going to happen in this case. Why create two projects for the tool when I already provided a vbscript to do the same? Seriously, lets move on.