NET USE in pre/post command...

Discussion in 'Acronis True Image Product Line' started by rjensen007, Nov 30, 2007.

Thread Status:
Not open for further replies.
  1. rjensen007

    rjensen007 Registered Member

    Joined:
    Nov 30, 2007
    Posts:
    12
    Is it possible to map a drive in the 'Pre/Post command' dialogue directly, or do I have to create a batch file? I simply want to run the commands:
    pre: NET USE \\Storage\phi pass /PERSISTENT:no
    post: NET USE \\Storage\phi /delete

    Thanks,
    Roy Jensen
     
  2. babac

    babac Registered Member

    Joined:
    Sep 16, 2006
    Posts:
    372
    Location:
    Montr?al,Qc.Ca
    Hi,
    The first thing that crosses my mind is to say ''why don't you try it''.
    Afterward, you come back here and you tell us.

    But all in all, I'm inclined to say you have to create a batch file with the note pad where you write your script and save it with a .bat extension.This one will work for sure as I'm already using it.
     
  3. rjensen007

    rjensen007 Registered Member

    Joined:
    Nov 30, 2007
    Posts:
    12
    Well, I kinda assumed that it would be intuitively obvious that I tried and couldn't get it to work. Hence the reason for the post.

    But okay: all the variants I tried (before the original post) failed.

    Please advise if anyone has gotten the following commands to work in the 'Pre/Post command' dialogue directly, or do I have to create a batch file?

    Pre: NET USE \\Storage\phi password /PERSISTENT:no
    Post: NET USE \\Storage\phi /delete

    Thanks,
    Roy Jensen
     
  4. foghorne

    foghorne Registered Member

    Joined:
    Sep 27, 2005
    Posts:
    1,389
    Location:
    Leeds, Great Britain
    I would always use a batch file as it makes it easier to add and remove stuff after a schedule has been setup. I'm not sure about this, but have you tried escaping your backslashes when running from a pre or post directly?

    E.g.NET USE \\\\Storage\\phi password /PERSISTENT:no

    F
     
  5. bodgy

    bodgy Registered Member

    Joined:
    Sep 22, 2005
    Posts:
    2,387
    Location:
    Qld.
    Have you tried using the IP address instead of the share name?

    If you map to a drive letter (which can be flaky in XP) does that make any difference?


    Colin
     
  6. rjensen007

    rjensen007 Registered Member

    Joined:
    Nov 30, 2007
    Posts:
    12
    To conclude this thread, the following procedure works :thumb:
    Command: CMD​
    Arguments: /c NET USE \\storage\phi pass /PERSISTENT:no​
    Arguments: /c NET USE \\Storage\phi /delete​

    /c

    Thanks!
    Roy Jensen
     
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.