Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   vbs in Delphi (https://www.delphipraxis.net/47053-vbs-delphi.html)

SnGtKs 5. Jun 2005 20:52


vbs in Delphi
 
hallo

ist es irgenwie möglich ein vbs in ein delphiprogramm einzubauen oder es zu übersetzen? ich in in dieser sache noch ein völliger n00b also pls helpme ;)

hier mal der vbs code

Delphi-Quellcode:
'
' WMI Script - ChangeVLKey.vbs
'
' This script changes the product key on the computer
'
'***************************************************************************

ON ERROR RESUME NEXT


if Wscript.arguments.count<1 then
   Wscript.echo "Script can't run without VolumeProductKey argument"
   Wscript.echo "Correct usage: Cscript ChangeVLKey.vbs ABCDE-FGHIJ-KLMNO-PRSTU-WYQZX"
   Wscript.quit
end if

Dim VOL_PROD_KEY
VOL_PROD_KEY = Wscript.arguments.Item(0)
VOL_PROD_KEY = Replace(VOL_PROD_KEY,"-","") 'remove hyphens if any

for each Obj in GetObject("winmgmts:{impersonationLevel=impersonate}").InstancesOf ("win32_WindowsProductActivation")

   result = Obj.SetProductKey (VOL_PROD_KEY)

   if err <> 0 then
      WScript.Echo Err.Description, "0x" & Hex(Err.Number)
      Err.Clear
   end if

Next

SnGtKs 9. Jun 2005 11:47

Re: vbs in Delphi
 
kann mir denn keiner helfen :(

*push*

BrunoT 9. Jun 2005 12:20

Re: vbs in Delphi
 
Hallo SnGtKs,

schau mal hier
Torrys

mfg

BrunoT


Alle Zeitangaben in WEZ +1. Es ist jetzt 00:13 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz