[C#] Problems with Network Drives

Discussion in 'Mixed Languages' started by CODYQX4, Nov 7, 2012.

  1. CODYQX4

    CODYQX4 MDL Developer

    Sep 4, 2009
    4,813
    45,775
    150
    #1 CODYQX4, Nov 7, 2012
    Last edited: Apr 12, 2019
    .
     
  2. user_hidden

    user_hidden MDL Expert

    Dec 18, 2007
    1,034
    1,061
    60
    #2 user_hidden, Nov 8, 2012
    Last edited by a moderator: Apr 20, 2017
    for reg.exe i presume you are using the REG IMPORT function with the reg file.

    perhaps try and use reg.exe in your vbs as cmdline adding of your keys with the ADD switch instead
    of looking for the "missing" .reg file ?

    Code:
    example:
    
    reg add "HKLM\SOFTWARE\Microsoft\Office\14.0\Registration\{90140000-003B-0000-0000-0000000FF1CE}" /f /v "LicenseType" /t REG_DWORD /d 7
    
     
  3. CODYQX4

    CODYQX4 MDL Developer

    Sep 4, 2009
    4,813
    45,775
    150
    #3 CODYQX4, Nov 8, 2012
    Last edited: Apr 12, 2019
    (OP)
    .
     
  4. Pr3acher

    Pr3acher MDL Member

    Aug 24, 2012
    143
    48
    10
    If yiu are using CreateProcess(), then *.vbs files don't work with it
     
  5. CODYQX4

    CODYQX4 MDL Developer

    Sep 4, 2009
    4,813
    45,775
    150
    #5 CODYQX4, Nov 8, 2012
    Last edited: Apr 12, 2019
    (OP)
    .
     
  6. Pr3acher

    Pr3acher MDL Member

    Aug 24, 2012
    143
    48
    10
    Oh ok, so i can't help you because i'm coding in C/C++ only o_O
     
  7. PAYMYRENT

    PAYMYRENT MDL Developer

    Jul 28, 2009
    1,460
    420
    60
    at the base the .net process class is calling that function depending on what you tell the startinfo props to do

    can i see some of your code. it would be helpful if we could see the snippet :D
     
  8. CODYQX4

    CODYQX4 MDL Developer

    Sep 4, 2009
    4,813
    45,775
    150
    #8 CODYQX4, Nov 13, 2012
    Last edited: Apr 12, 2019
    (OP)
    .
     
  9. PAYMYRENT

    PAYMYRENT MDL Developer

    Jul 28, 2009
    1,460
    420
    60
    #9 PAYMYRENT, Nov 13, 2012
    Last edited: Nov 13, 2012
    when you run the process did you set the current directory//working directory to temp also. if you didnt it will tell the script that it is being ran off of the Network drive or path when the file is in the TEMP folder. making it so the script doesnt know where the reg files are because those are in the temp also???
     
  10. CODYQX4

    CODYQX4 MDL Developer

    Sep 4, 2009
    4,813
    45,775
    150
    #10 CODYQX4, Nov 13, 2012
    Last edited: Apr 12, 2019
    (OP)
    .
     
  11. PAYMYRENT

    PAYMYRENT MDL Developer

    Jul 28, 2009
    1,460
    420
    60
    #11 PAYMYRENT, Nov 13, 2012
    Last edited by a moderator: Apr 20, 2017
    oh ok i was just tyring to clear things up...

    would it be something stupid like spaces in the path?

    maybe add chr(34) to the start of the path and chr(34) to the end of the path... ive ran into problems because of that

    Code:
       Result result = CommonUtilities.ExecuteCommand("cscript " + Chr(34) + saveAsName + Chr(34) + " All /DeleteUserSettings /Force /OSE /Quiet", true);
     
  12. CODYQX4

    CODYQX4 MDL Developer

    Sep 4, 2009
    4,813
    45,775
    150
    #12 CODYQX4, Nov 13, 2012
    Last edited: Apr 12, 2019
    (OP)
    .
     
  13. PAYMYRENT

    PAYMYRENT MDL Developer

    Jul 28, 2009
    1,460
    420
    60
    ok run this command to you see what im saying

    sc create a a

    then run this command

    sc create "a a"

    the first one fails because the system is telling it that a a is two different arguments

    the second one works because the system is saying "a a" is one argument

    to undo this thing

    just run sc delete "a a"
     
  14. CODYQX4

    CODYQX4 MDL Developer

    Sep 4, 2009
    4,813
    45,775
    150
    #14 CODYQX4, Nov 13, 2012
    Last edited: Apr 12, 2019
    (OP)
    .
     
  15. PAYMYRENT

    PAYMYRENT MDL Developer

    Jul 28, 2009
    1,460
    420
    60
    can i have a copy of the vbs? i want to mess around with it on my network :p if mean if its cool
     
  16. CODYQX4

    CODYQX4 MDL Developer

    Sep 4, 2009
    4,813
    45,775
    150
    #16 CODYQX4, Nov 14, 2012
    Last edited: Apr 12, 2019
    (OP)
    .
     
  17. PAYMYRENT

    PAYMYRENT MDL Developer

    Jul 28, 2009
    1,460
    420
    60
    all this work :( lol ill get it
     
  18. Josh Cell

    Josh Cell MDL Developer

    Jan 8, 2011
    3,515
    7,170
    120
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  19. PAYMYRENT

    PAYMYRENT MDL Developer

    Jul 28, 2009
    1,460
    420
    60
    lol i just got the msi extractor from the other machine :p