Пример #1
0
        // -------------------------------------------------------------

        /** [STATIC]
         * Erstellt alle nötigen VBS Dateien im Temp ordner
         */
        private static void CreateTempVBSFiles(  )
        {
            #if (LOGLEVEL_DEBUG)
            Logging.Trace(KLASSE + ".CreateTempVBSFiles (  )");
            #endif

            // -------------------------------

            string TempPath_string = Shortcuts.tempPath_string;
            bool   PathNotExists   = !Directory.Exists(TempPath_string);

            if (PathNotExists)
            {
                Directory.CreateDirectory(TempPath_string);
            }

            Shortcuts.CreateVBSFile(TempPath_string + VBSFileNames.GetTargetPath, Shortcuts.WSCRIPT + Shortcuts.TARGETPATH);
            Shortcuts.CreateVBSFile(TempPath_string + VBSFileNames.GetArguments, Shortcuts.WSCRIPT + Shortcuts.ARGUMENTS);
            Shortcuts.CreateVBSFile(TempPath_string + VBSFileNames.GetIconLocation, Shortcuts.WSCRIPT + Shortcuts.ICONLOCATION);
            Shortcuts.CreateVBSFile(TempPath_string + VBSFileNames.GetWorkingDirectory, Shortcuts.WSCRIPT + Shortcuts.WORKINGDIRECTORY);
            Shortcuts.CreateVBSFile(TempPath_string + VBSFileNames.GetHotKey, Shortcuts.WSCRIPT + Shortcuts.HOTKEY);
            Shortcuts.CreateVBSFile(TempPath_string + VBSFileNames.GetWindowSytle, Shortcuts.WSCRIPT + Shortcuts.WINDOWSTYLE);

            Shortcuts.CreateVBS_SETValue(TempPath_string + VBSFileNames.SetTargetPath, Shortcuts.TARGETPATH);
            Shortcuts.CreateVBS_SETValue(TempPath_string + VBSFileNames.SetArguments, Shortcuts.ARGUMENTS);
            Shortcuts.CreateVBS_SETValue(TempPath_string + VBSFileNames.SetIconLocation, Shortcuts.ICONLOCATION);
            Shortcuts.CreateVBS_SETValue(TempPath_string + VBSFileNames.SetWorkingDirectory, Shortcuts.WORKINGDIRECTORY);
            Shortcuts.CreateVBS_SETValue(TempPath_string + VBSFileNames.SetHotKey, Shortcuts.HOTKEY);
            Shortcuts.CreateVBS_SETValue(TempPath_string + VBSFileNames.SetWindowStyle, Shortcuts.WINDOWSTYLE);

            // -------------------------------

            TempPath_string = null;
        }
Пример #2
0
        // -------------------------------------------------------------

        /** [STATIC]
         * Legt eine VBS Datei an, die den TargetPath aus einer Verknüpgunh festlegt
         *
         * @param[in] _FilePath_string (string) Der Pfad wo die VBS Datei liegen soll
         */
        private static void CreateVBS_SETValue(string _FilePath_string, string _Value)
        {
            #if (LOGLEVEL_DEBUG)
            string methodeName = KLASSE + ".CreateVBS_SETValue ( string _FilePath_string, string _Value )";
            Logging.Trace(methodeName);
            Logging.Debug(methodeName, "_FilePath_string", _FilePath_string);
            Logging.Debug(methodeName, "_Value", _Value);
            #endif

            // -------------------------------

            string VBS_Content_string = CreateVBS_ContentSave(_Value);

            Shortcuts.CreateVBSFile(_FilePath_string, VBS_Content_string);

            // -------------------------------

            _Value             = null;
            _FilePath_string   = null;
            VBS_Content_string = null;
        }