#186495 - 2008-03-25 09:46 PM
Re: File Copying Script assistance
[Re: Glenn Barnas]
|
DieselDoc
Fresh Scripter
Registered: 2008-03-19
Posts: 13
|
Just don't call me grasshopper! Haha - I have to say thank you to all of you guys, not just for the info but also for putting me on the road to being able to troubleshoot this stuff on my own.
The script is working!!! WOOO HOOOO!
I started pulling out lines or sets of lines and running them from a separate kix file. The output syntax was a big help too. And I didn't even think about the link to the DOS commands.
The problem was indeed on another line, for the word /PERSISTANT is spelled with an two E's. Who would've thought...haha.
Use * /DELETE /PERSISTENT ; Line 56
And also there was a quote missing off the end of IT in Line 70:
Case $service ="~IT"
Here's the final script for the rest of you noobs:
; TEST.KIX
If NOT @LOGONMODE
Break On
EndIf
$SO=SETOPTION("Explicit", "ON")
$SO=SETOPTION("NoMacrosInStrings", "ON")
$SO=SETOPTION("NoVarsInStrings", "ON")
$SO=SETOPTION("WrapAtEOL", "ON")
;Set Variables
dim $os,$public,$service,$assigned,$Pserver,$department
CLS
$OS=@dos ;OS Versio
$public="\\THC-GA\Public" ;Public Share
$service=@comment ;Department assigned from comment field
$Pserver="\\THC-GA\" ;Server for User Accounts
$department=$Pserver + $service ;Departmental Share
;$personal=$Pserver + @userid+"$" ;Personal Share
;SetTime "\\thc-ga\" ;Unless you have NT / 95 not needed
;******************************************************************
;*** BEGIN Instructions by Department
;******************************************************************
Use * /DELETE /Persistent
Use N: $public ;MAP Public Share
Use O: $department ;MAP Department Share
Select
Case $service = "~AHPs"
Use T: "\\Cs-cb\Transcription"
Case $service = "~Clinical"
Use T: "\\Cs-cb\Transcription"
Case $service = "~Diagnostics"
Use T: "\\Cs-cb\Transcription"
Case $service ="~IT"
Use S: "\\THC-GA\Software"
Case $service = "~MedicalRecords"
Use U: "\\cbs-cb\Transcription"
Case $service = "~Physicians"
Use T: "\\Cbs-cb\Transcription"
EndSelect
:REGISTERED-OWNER
$ReturnCode = WriteValue("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion","RegisteredOrganization","Napa Valley Cardiovascular Associates, P.C.","REG_SZ")
$ReturnCode = WriteValue("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion","RegisteredOwner","The Health Center","REG_SZ")
;******************************************************************
;*** BEGIN Instructions by Group
;******************************************************************
:SOFTWARE
If InGroup("APP-PEACHTREE")
Use Q: "\\APP01\PEACHTREE"
EndIf
If InGroup("APP-SOLOMAN")
Use S: "\\SUPERIOR-FS\SOLOMAN"
EndIf
If InGroup("APP-APD")
Use R: "\\DENARI\EZTIMEG"
Use T: "\\DENARI\TIMEOUT"
EndIf
If InGroup("APP_HOLSTER")
Use U: "\\THC-GA\HOLSTER DAT"
EndIf
; **Adding icon to group below's Desktop**
If InGroup("APP-Allscripts")
If Not Exist (%UserProfile% + "\Desktop\Allscripts.rdp")
Copy "\\Sec01\deploy\Shortcuts\Allscripts.rdp" %UserProfile% + "\Desktop"
? "Return code was :" + @Error + " -Descriptive text " + @serror ;remove after testing
EndIf
EndIf
;******************************************************************
;*** END Instructions by Group
;******************************************************************
;******************************************************************
;*** BEGIN Miscellaneous Instructions
;******************************************************************
; **Clears the C:\TEMP Directory** [BEGIN]
Go C:
Del "C:\TEMP\*.PDF"
Del "C:\TEMP\*.DWG"
Del "C:\TEMP\*.DOC"
Del "C:\TEMP\*.BMP"
Del "C:\TEMP\*.JPG"
Del "C:\TEMP\*.TXT"
Del "C:\TEMP\*.XLS"
Del "C:\TEMP\*.PPT"
Del "C:\TEMP\*.MDB"
Del "C:\TEMP\*.ZIP"
Del "C:\TEMP\*.EXE"
;******************************************************************
;*** END Miscellaneous Instructions
;******************************************************************
Exit
THANK YOU!!!
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1441 anonymous users online.
|
|
|