Community Forums
Results 1 to 2 of 2

Thread: Reg_expand_sz Type Key

  1. #1
    Join Date
    May 2011
    Posts
    1

    Post Reg_expand_sz Type Key

    I wanted to create a key "(Default)" under
    HKEY_LOCAL_MACHINE\SOFTWARE\Classes\VBSFile\Shell\runas\Command as REG_EXPAND_SZ type. But I am also getting one entry with same name with type REG_SZ.

    Here is my code:
    RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
    RegKy = "SOFTWARE\\Classes\\VBSFile\\Shell\\runas\\Command";
    if( RegDBKeyExist ( RegKy) != 1 )then
    rst = RegDBSetKeyValueEx(RegKy, "(Default)", REGDB_STRING_EXPAND, "%SystemRoot%\\System32\\WScript.exe \"%1\" %*", -1);
    if (rst < 0) then
    MessageBox("Failed to value", WARNING);
    endif;
    endif;


    I dont want the another key with REG_SZ type. Please suggest.

    Thanks

  2. #2
    Join Date
    Jan 2009
    Location
    Bangalore, India
    Posts
    31
    Hi Mthapa,

    Trying on which product.? PLease check if this was the right forum for you.
    Sudeep H S
    Senior Developer, InstallAnywhere
    Flexera Software.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •