KeyFinder batch file.. Help
Ok here my situation my company is getting audit on software soon and we been using OEM, cracked copies legit copies of all different types of software. Any who it’s a real mess so I made a batch file that calls magic jelly bean[:)] that scans my computer and then saves it into a csv file with the date and time and it works fine. Here were its gets tricky I have to deploy this across my domain which are about 100+ users and computers. I created another batch file that uses psexec to push out my keyfinder bat but it fails with my domain admin id saying "Access denied". I don't know what to do, I was thinking of taking the exe and making it into a MSI file but that means I got push it out through GP and really I just want to run my script go on lunch and come back and it’s done lol. Can some help or maybe guide me to vbs if its simpler. Thank You.
Here is my keyfinder bat:
\\lc-it7\keyme\keyfinder.exe /savecsv \\lc-it7\keyme\ /close
echo Date and Time of info >> \\lc-it7\Keyme\%computername%.csv
date /t >> \\lc-it7\Keyme\%computername%.csv
time /t >> \\lc-it7\Keyme\%computername%.csv
Here is my psexec bat:
for /f %%a in (it.txt) do (
psexec \\%%a% -c -d -f -i -s -u maspethfederal\cataldo -p bigkey finddakey.bat /quiet
)
Here is my keyfinder bat:
\\lc-it7\keyme\keyfinder.exe /savecsv \\lc-it7\keyme\ /close
echo Date and Time of info >> \\lc-it7\Keyme\%computername%.csv
date /t >> \\lc-it7\Keyme\%computername%.csv
time /t >> \\lc-it7\Keyme\%computername%.csv
Here is my psexec bat:
for /f %%a in (it.txt) do (
psexec \\%%a% -c -d -f -i -s -u maspethfederal\cataldo -p bigkey finddakey.bat /quiet
)
0 Comments
[ + ] Show comments
Answers (6)
Please log in to answer
Posted by:
anonymous_9363
15 years ago
If you're getting 'Access denied' from your batch file, an MSI or VBS (or Perl or PowerShell or [insert any other scripting language] won't make any difference. Additionally, if a domain admin account is getting 'Access denied' errors from machines, I'd be sorting that problem first! Start by creating a list of those machines for which you get that error. If it's all of them....you're going to be busy.
Posted by:
cbohs
15 years ago
Posted by:
dcataldo
15 years ago
Hi cbohs, I took older bat file that i was using psexec that bat was pushing out ace messager client to machines on my domain and it worked. All i did was change the ace messager.exe to finddakey.bat and I’m having access denied. I also ran my psexec.bat for my computer and it worked when i try to target different computers it just gives me a cvs file with date and time.
I copied it from cmd prompt and this what i get:
C:\Documents and Settings\dcataldo\Desktop\Keyss>psex.bat
C:\Documents and Settings\dcataldo\Desktop\Keyss>for /F %a in (it.txt) do (psexe
c \\%a -c -d -f -i -s -u maspethfederal\dcataldo -p bigkey finddakey.bat /quie
t )
C:\Documents and Settings\dcataldo\Desktop\Keyss>(psexec \\LC-IT2 -c -d -f -i -s
-u maspethfederal\dcataldo -p bigkey finddakey.bat /quiet )
PsExec v1.94 - Execute processes remotely
Copyright (C) 2001-2008 Mark Russinovich
Sysinternals - www.sysinternals.com
finddakey.bat started on LC-IT2 with process ID 5924.
C:\Documents and Settings\dcataldo\Desktop\Keyss>(psexec \\LC-IT7 -c -d -f -i -s
-u maspethfederal\dcataldo -p bigkey finddakey.bat /quiet )
PsExec v1.94 - Execute processes remotely
Copyright (C) 2001-2008 Mark Russinovich
Sysinternals - www.sysinternals.com
finddakey.bat started on LC-IT7 with process ID 2100.
I copied it from cmd prompt and this what i get:
C:\Documents and Settings\dcataldo\Desktop\Keyss>psex.bat
C:\Documents and Settings\dcataldo\Desktop\Keyss>for /F %a in (it.txt) do (psexe
c \\%a -c -d -f -i -s -u maspethfederal\dcataldo -p bigkey finddakey.bat /quie
t )
C:\Documents and Settings\dcataldo\Desktop\Keyss>(psexec \\LC-IT2 -c -d -f -i -s
-u maspethfederal\dcataldo -p bigkey finddakey.bat /quiet )
PsExec v1.94 - Execute processes remotely
Copyright (C) 2001-2008 Mark Russinovich
Sysinternals - www.sysinternals.com
finddakey.bat started on LC-IT2 with process ID 5924.
C:\Documents and Settings\dcataldo\Desktop\Keyss>(psexec \\LC-IT7 -c -d -f -i -s
-u maspethfederal\dcataldo -p bigkey finddakey.bat /quiet )
PsExec v1.94 - Execute processes remotely
Copyright (C) 2001-2008 Mark Russinovich
Sysinternals - www.sysinternals.com
finddakey.bat started on LC-IT7 with process ID 2100.
Posted by:
anonymous_9363
15 years ago
Forgive me: I should have looked at what you're actually trying to achieve. Forget DOS-based scripts. They're too inflexible. Check out the MouseTrax Domain Reporting script. It is truly awesome [over-used word, but valid in this case]. http://www.mousetrax.com/downloads.html#DomainReportManager
If you still get 'Access Denied' errors then, as I mentioned, you have bigger issues.
If you still get 'Access Denied' errors then, as I mentioned, you have bigger issues.
Posted by:
dcataldo
15 years ago
Posted by:
anonymous_9363
15 years ago
The purpose of directing you to that script was so that you could perhaps use it as a domain-walking shell, into which you could plug whatever code you required.
It follows that, if KeyFinder can extract serial number information, so can a script. IIRC, this tool extracts keys for XP and Office, right? MS provides a script to change XP VLKs which you could easily adapt http://support.microsoft.com/kb/328874, or there's this http://www.visualbasicscript.com/m_42793/tm.htm which handily includes a search for MS Office 2003. My understanding is that, for Office 2007, you would substitute '11.0' with '12.0'.
It follows that, if KeyFinder can extract serial number information, so can a script. IIRC, this tool extracts keys for XP and Office, right? MS provides a script to change XP VLKs which you could easily adapt http://support.microsoft.com/kb/328874, or there's this http://www.visualbasicscript.com/m_42793/tm.htm which handily includes a search for MS Office 2003. My understanding is that, for Office 2007, you would substitute '11.0' with '12.0'.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.