I have an issue with a script that I have.
What I am trying to do is to create a MS exe that I can give to users that they can run & it will save a txt file to their Z: drive with all there current drive mappings.
Now this part I have, I also have it so that it displays the drive mapping in a Message Box.
What I am wanting to do is to add an option on the dialog to auto map the drives via the dos command. Any suggests or code would be great as I am at a lost. I am thinking about reading the lines to read the mapping config, however not sure how to go.
Code: Select all
Let>APP_TITLE=Drive Mapping CFG Saver
Dialog>DriveCFG
Caption=Drive Map CFG
Width=161
Height=155
Top=CENTER
Left=CENTER
Max=0
Min=0
Close=1
Resize=0
Label=Drive Mapping Config Saver,8,8,true
Button=Save Config File,8,24,137,25,3
Button=Load Saved Config File,8,56,137,25,4
Button=Exit,8,88,137,25,2
EndDialog>DriveCFG
Show>DriveCFG
Label>ActionLoop
GetDialogAction>DriveCFG,Result
if>Result=2,Exit
if>Result=3,Save
if>Result=4,Read
Goto>ActionLoop
//Write Drive Mapping CFG
Label>Save
Let>RP_WAIT=1
Let>RP_WINDOWMODE=0
Run Program>cmd /c net use > Z:\DriveMapping.txt
Let>RP_WINDOWMODE=1
Let>RP_WAIT=0
Goto>Read
//Read Drive Mapping CFG
Label>Read
ReadFile>Z:\DriveMapping.txt,MappingInformation
Let>MSG_HEIGHT=300
Let>MSG_WIDTH=500
MessageModal>%MappingInformation%
ResetDialogAction>DriveCFG
Goto>ActionLoop
Label>Exit