Run while user profile is logged off

Author Message
jrs872

  • Total Posts : 1
  • Scores: 0
  • Reward points : 0
  • Joined: 5/5/2010
  • Status: offline
Run while user profile is logged off Wednesday, March 30, 2011 11:21 PM (permalink)
0
I may have solved my issue ... I hope ... I think my problem has to do with drive mapping ... when user logs on a script is run mapping all the drives, Q drive in my example below is on another server so I changed the code to direct it to the server URL.
 
Good Morning All,
 
I was wondering if anyone can lend a hand to this issue I am having. I have the script below which moves and renames a file. It works fine when the user profile is logged on however when windows scheduler tries to run the script over night ( and user is logged off)  it does not run. I am running it on a server and have given administrator permissions in the scheduler. Any ideas how I can get this to run overnight?
Thanks,
Jeff
 
 
Dim objFSO
Dim today
dim xtime
today = Right("0" & Month(Date),2) & Right("0" & Day(Date),2) & Year(Date) & "_"
xTime  = Hour(Now()) & Minute(Now()) & Second(Now())

Set objFSO = CreateObject("Scripting.FileSystemObject")
If (objFSO.FileExists("D:\HRLOGIX\EMP35FNH.CSV")) Then
 objFSO.MoveFile "D:\HRLOGIX\EMP35FNH.CSV" , "Q:\HRLR\EMP35FNH_" & today & xTime & ".csv"
 
End If
 
If (objFSO.FileExists("D:\HRLOGIX\EMP35FRH.CSV")) Then
 objFSO.MoveFile "D:\HRLOGIX\EMP35FRH.CSV" , "Q:\HRLR\EMP35FRH_" & today & xTime & ".csv"
 
End If
 
If (objFSO.FileExists("D:\HRLOGIX\EMP35GNH.CSV")) Then
 objFSO.MoveFile "D:\HRLOGIX\EMP35GNH.CSV" , "Q:\HRLR\EMP35GNH_" & today & xTime & ".csv"
 
End If
 
If (objFSO.FileExists("D:\HRLOGIX\EMP35GRH.CSV")) Then
 objFSO.MoveFile "D:\HRLOGIX\EMP35GRH.CSV" , "Q:\HRLR\EMP35GRH_" & today & xTime & ".csv"
 
End If
 
Set objFSO = Nothing
 
 
 
 
<message edited by jrs872 on Thursday, March 31, 2011 1:30 AM>
 
#1

    Online Bookmarks Sharing: Share/Bookmark

    Jump to:

    Current active users

    There are 0 members and 1 guests.

    Icon Legend and Permission

    • New Messages
    • No New Messages
    • Hot Topic w/ New Messages
    • Hot Topic w/o New Messages
    • Locked w/ New Messages
    • Locked w/o New Messages
    • Read Message
    • Post New Thread
    • Reply to message
    • Post New Poll
    • Submit Vote
    • Post reward post
    • Delete my own posts
    • Delete my own threads
    • Rate post

    2000-2012 ASPPlayground.NET Forum Version 3.9