Jump to content

cmd

Member
  • Posts

    3
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United Kingdom

About cmd

cmd's Achievements

0

Reputation

  1. Sorry for the late reply. Thanks
  2. Set WshShell = WScript.CreateObject("WScript.Shell") dir = "abc" WshShell.RegWrite "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Installation\InstallPath", "a" WshShell.RegWrite "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\First Name", "b" WshShell.RegWrite "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Last Name", "c" WshShell.RegWrite "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Organization", "d" WshShell.RegWrite "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Register", "e" WshShell.RegWrite "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Serial Number", "f" WshShell.RegWrite "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Validation", "g" Next WScript.Echo WshShell.RegRead "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Installation\InstallPath" WScript.Echo WshShell.RegRead "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\First Name" WScript.Echo WshShell.RegRead "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Last Name" WScript.Echo WshShell.RegRead "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Organization" WScript.Echo WshShell.RegRead "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Register" WScript.Echo WshShell.RegRead "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Serial Number" WScript.Echo WshShell.RegRead "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Validation"It gave me an unexpected 'Next' Set WshShell = WScript.CreateObject("WScript.Shell") dir = "abc" WshShell.RegWrite "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Installation\InstallPath", "a" WshShell.RegWrite "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\First Name", "b" WshShell.RegWrite "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Last Name", "c" WshShell.RegWrite "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Organization", "d" WshShell.RegWrite "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Register", "e" WshShell.RegWrite "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Serial Number", "f" WshShell.RegWrite "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Validation", "g" WScript.Echo WshShell.RegRead("HKLM\SOFTWARE\Macromedia\" & dir & "\6\Installation\InstallPath") WScript.Echo WshShell.RegRead("HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\First Name") WScript.Echo WshShell.RegRead("HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Last Name") WScript.Echo WshShell.RegRead("HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Organization") WScript.Echo WshShell.RegRead("HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Register") WScript.Echo WshShell.RegRead("HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Serial Number") WScript.Echo WshShell.RegRead("HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Validation")That works, although I don't know why. Maybe it's becuase I put a function inside a function so it wanted parentheses? Thanks
  3. Set WshShell = WScript.CreateObject("WScript.Shell") dir = "abc" WshShell.RegWrite "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Installation\InstallPath", "a" WshShell.RegWrite "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\First Name", "b" WshShell.RegWrite "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Last Name", "c" WshShell.RegWrite "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Organization", "d" WshShell.RegWrite "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Register", "e" WshShell.RegWrite "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Serial Number", "f" WshShell.RegWrite "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Validation", "g" WScript.Echo WshShell.RegRead "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Installation\InstallPath" WScript.Echo WshShell.RegRead "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\First Name" WScript.Echo WshShell.RegRead "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Last Name" WScript.Echo WshShell.RegRead "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Organization" WScript.Echo WshShell.RegRead "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Register" WScript.Echo WshShell.RegRead "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Serial Number" WScript.Echo WshShell.RegRead "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Validation" That code gives an error, Line 10, Char 31, 'Expected end of statement'. However, this works fine: Set WshShell = WScript.CreateObject("WScript.Shell") dir = "abc" WshShell.RegWrite "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Installation\InstallPath", "a" WshShell.RegWrite "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\First Name", "b" WshShell.RegWrite "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Last Name", "c" WshShell.RegWrite "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Organization", "d" WshShell.RegWrite "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Register", "e" WshShell.RegWrite "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Serial Number", "f" WshShell.RegWrite "HKLM\SOFTWARE\Macromedia\" & dir & "\6\Registration\Validation", "g" I can't see anything wrong with the first code. Can you? Note that I have changed what is being written to the registry (I don't exactly want to write a,b,c etc.)
×
×
  • Create New...