˹á
 úҹ
  C/C++ new
  Java new
 Sourcecode.TV
  Android
  Blackberry
  C/C++
  Java
  Linux
  Windows Phone
  ͧͧ
 
  .NET
  Android
  Blackberry
  C++Builder
  Delphi
  Java
  Mobile
  Open Source
  Pocket PC
  Visual Basic
  Web
  Windows Phone
  Others
 Ẻ¹
  ASP
  ASP.NET Webmatrix
  C++
  eVB
  J2ME
  Java
  PHP
 
  Android
  ASP
  C++
  VC++
  CGI-Perl
  Delphi
  Java
  jQuery
  PHP
  Visual Basic
  .NET
 ԡèҡ
  Դ...
  DoodeeHosting
  Ѻ͡Ẻ Ѳ䫵
  Freeware
  ѵҤɳ
  ª١
  ʶԵԼ
 Ŵ
 Ң
 дҹʹ
  .NET
  C/C++
  Delphi
  Java
  Palm/PocketPC
  Visual Basic
  Web
 
 дҹҹ
 ԧ
 ǡѺ
 ѵҤɳ
Social Network

Facebook  Twitter  YouTube
 New Article
 Webboard
 Freelanceboard
Freeware
 (BerDee)
(Android)
駩غ
駩غ(Android)
WebcamMonitor
WebcamMonitor(Windows)
scSendMail
scSendMail(Windows)
MSN Caption
MSN Caption(Windows)
  Freelance comment
  ԴͺʹФѺ...
2015-07-29 13:35:58
  Ҽͧ纷ѲҴ HTML5 ...
2015-01-18 15:33:54
  Ҽͧ纷ѲҴ HTML5 ...
2015-01-18 15:32:51
  ԴͺФѺ
ҹ...

2014-01-06 12:47:38
  ѧҤ͹ ͧ֡ͧ...
2013-07-06 01:04:37
  ʹ觢ͺࢵҤҤҡ͹ФѺ...
2013-03-24 18:54:20
  ѧդѺҹԴѺ 08...
2012-12-16 19:18:14
  ʹ㨤 Դ 0905076277...
2012-11-12 11:07:46
  Ѻ礹ѡ֡ͺѷ
...

2012-10-29 03:10:46
  sukit_te34@hotmail.com...
2012-10-29 03:09:36
  Webboard comment
  Ѻ ͹ matlab ¹ matlab...
2017-06-03 16:27:23
  ੾зҧҴ ͧҢ...
2017-05-25 16:18:08
  ͧ˹Ѻ os ...
2017-05-25 16:12:47
  ¹ php curl ...
2017-04-20 01:04:20
  ¹ ...
2017-03-27 12:50:54
  ʧҷ ͧѾഷ...
2017-03-27 12:37:20
  ͺõͺ...
2017-02-22 13:10:24
  ͧաԸ¹ recursive f...
2017-02-14 13:11:03
  ҡ кͧشҡ...
2017-01-30 11:45:28
  for-loop ͹ѹ
...

2017-01-28 16:00:12
  Homework comment
  ͺسҡѺ...
2017-08-16 18:27:25
  ͧ ͧ ѧ ^^...
2017-04-18 18:40:46
  ͧ ͧ ѧ ^^...
2017-04-18 18:37:54
  á flowchart ѹ...
2017-04-18 17:43:33
  ҡ flowchart ...
2017-04-18 16:25:29
  kungking ӶäѺ ?...
2017-03-18 23:28:36
  ¹ʴͧ...
2017-03-06 10:56:25
  鴷ӧҹẺ ...
2016-09-06 01:00:12
  ҡҺ鴹Ѻѧ...
2016-09-05 09:31:27
  ͧ֡¹...
2016-04-22 00:47:49
  Article comment
  [b]
2017-08-11 22:39:58
  [b]
...

2017-08-11 14:46:33
  ҨѺ ͧ
...

2017-07-11 09:59:35
  ö͡Ѻ anycast ...
2017-07-05 10:12:35
  Ѻ س "Դ" ͧ֡...
2016-06-18 15:21:09
  vs2008 c# Ѻ ͺسѺ...
2016-06-17 14:39:30
  vs c# ӵآ鹵͹...
2016-06-17 14:37:44
  ͧѺ "Ҩԧ ...
2016-03-12 23:36:05
  觢ͤǧ LAN ੾Ф...
2016-03-12 18:25:42
  Terminal Mac ...
2016-02-16 11:02:01
  9Mcode comment
  ҡ...
2014-02-21 08:52:19

Link Exchange

ѵҤɳ
Statistics of Sourcecode in Thailand
 
ԸաҧԴ Ѻ PDA (PPC2003) VS 2005 (ҹ 26,350)
Ԩ ͧ (9'M) : Ԩ ͧ (9'M)
e-mail: webmaster@sourcecode.in.th
mobile: 09-5009-5351
Line: suppakit.thongdee
Youtube: 9Mcode
Fanpage: Sourcecode.in.th
   
: Ŵҧ (Ŵ 2,203 )

- - - - - - - - - - - - - - ʹѺʹع- - - - - - - - - - - - - -

 
 
FreelanceѺѲ 9'M 

繡ʴ֧ҧ ҧ setup 㹡õԴ PDA ѡѲӡҧ ҡԸաù PDA 仵Դ駹 öзԸ 蹡ҧ cab file ӡ Ѵͧ͡ PDA ǷӡõԴ ͡ҡ ѧԴ駷 EXE Ǣ͹ Ҩ¹֧ ӴѺ鹵͹ Ըա÷Դ駴ѧ ѹ

ҡ ѡѲաþѲਤ Ѻ Pocket PC 2003 Visual Studio 2005 ѧٻ

ԡʹҾ˭

ӴѺ鹵͹㹡ҧԴ մ¡ѹѧ

  1. ҧ Cab Project
  2. ҧ Installer DLL
  3. ҧ INI File
  4. ҧ MSI

ҧ Cab Project

Cab Project 繡ҧСͺ ǡѺ zip,jar, rar ѡɳТͧ cab file ҨлСͺ ١ѲҢ¹ѡѲ Ш繵ͧСͺѺ ѲҢ exe,dll,sdf,bmp

㹡ҧҡ äԡ͡ File > Add > new Project ͧ Visual Studio 2005
͡ Other Project Types > Setup and Deployment > Smart Device CAB Project С˹ Name sampleCab ԡ OK ׹ѹ÷ӧҹѧٻ

ԡʹҾ˭

ԡҷਤ sampleCab ͡ Add Project Output... лҡ˹ҵҧѧٻ

ԡʹҾ˭

ӡ͡Project sampleApp ਤͧѡѲҧ Ƿӡ͡ Primary output Фԡ OK ׹ѹ з¡âͧ к ਤͧ ʴѧٻҹҧ

*** 㹡óշͧѡѲ ա¡ҹ ਤ bmp(ٻҾ) sdf(ҹ) ѡѲҹѧ ·ӡ͡աͺ ͡ Content Files

سԡҷਤ sampleCab ͡ Properties лҡ˹ҵҧ ҡ˹ҵҧ ͡ Configuration Release 㹪ͧ Out put file name ʴ cab file ж١ҧ ѧٻ

ԡʹҾ˭

ӡäԡ Configuration Manager... лҡ˹ҵҧ سӡ͡ Active Solution Configuration Release Фԡ Close ͻԴ˹ҵҧ ѧٻ

ԡʹҾ˭

͡ҡ Cab Project ҧ ѧդöѲҡ˹ŧ Registryͧͧж١Դ ҹҧ˹ҵҧ Registry Editor ѧʴٻ

سͺҧ cab file ¤ԡҷਤ sampleCab ͡ Build.. ѧٻ

cab file ж١ҧҢͧ Out put file name աá˹͹˹ҹ ѧٻ

Ҷ֧͹س cab file 㹡ҧԴ

ҧ Installer DLL

繡ҧ dll 㹡äǺкǹ㹡õԴ 鴷 C#

¤ԡ͡ File > Add > New Project ͻҡ˹ҵҧ New Project سӡ͡ Visual C# > Windows > Class Library С˹ Name դ InstallerDLL ѧٻ

ԡʹҾ˭

installerDLL ҡ سӡäԡҷ Class1.cs ͡ Delete
ҡ鹷ӡäԡҷਤ InstallerDLL ͡ Add > New Item лҡ˹ҵҧ ӡ͡ Installer Class ǡ˹ CustomInstaller.cs ѧٻ

ԡʹҾ˭

ҡӡ鴢ͧ CustomInstaller.cs ѧ

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration.Install;
using Microsoft.Win32;
using System.IO;

namespace InstallerDLL
{
    [RunInstaller(true)]
    public partial class CustomInstaller : Installer
    {
        private const string CEAPPMGR_PATH = @"SOFTWAREMicrosoftWindowsCurrentVersionApp PathsCEAPPMGR.EXE";
        private const string ACTIVESYNC_INSTALL_PATH = @"SOFTWAREMicrosoftWindows CE Services";
        private const string CEAPPMGR_EXE_FILE = @"CEAPPMGR.EXE";
        private const string CEAPPMGR_INI_FILE = @"sampleApp.ini";
        private const string APP_SUBDIR = @"sampleApp";
        private string TEMP_PATH = Environment.SystemDirectory + @"TEMPsampleApp";


        public CustomInstaller()
        {
            InitializeComponent();
            this.BeforeInstall += new InstallEventHandler(CustomInstaller_BeforeInstall);
            this.AfterInstall += new InstallEventHandler(CustomInstaller_AfterInstall);
            this.BeforeUninstall += new InstallEventHandler(CustomInstaller_BeforeUninstall);
     
        }

        private string GetAppInstallDirectory()
        {
            // get the ActiveSync install directory
            RegistryKey keyActiveSync = Registry.LocalMachine.OpenSubKey(ACTIVESYNC_INSTALL_PATH);

            if (keyActiveSync == null)
            {
                throw new Exception("ActiveSync is not installed.");
            }

            // build the target directory path under ActiveSync
            string activeSyncPath = (string)keyActiveSync.GetValue("InstalledDir");
            string installPath = activeSyncPath + APP_SUBDIR;
            keyActiveSync.Close();
            return installPath;
        }

        void CustomInstaller_BeforeInstall(object sender, InstallEventArgs e)
        {

            // find where we're going to be installed
            string installPath = GetAppInstallDirectory();

            // create the target directory
            Directory.CreateDirectory(installPath);

            // copy our app files to the directory
            foreach (string installFile in Directory.GetFiles(TEMP_PATH))
            {
                File.Copy(installFile, Path.Combine(installPath,Path.GetFileName(installFile)), true);
            }

            // get the path to ceappmgr.exe
            RegistryKey keyAppMgr = Registry.LocalMachine.OpenSubKey(CEAPPMGR_PATH);

            string appMgrPath = (string)keyAppMgr.GetValue(null);
            keyAppMgr.Close();

            // run CeAppMgr.exe to install the files to the device
            System.Diagnostics.Process.Start(appMgrPath,""" + Path.Combine(installPath, CEAPPMGR_INI_FILE) + """);

        }

        void CustomInstaller_AfterInstall(object sender, InstallEventArgs e)
        {

            // delete the temp files
            foreach (string tempFile in Directory.GetFiles(TEMP_PATH))
            {
                File.Delete(tempFile);
            }

        }


        void CustomInstaller_BeforeUninstall(object sender, InstallEventArgs e)
        {

            // find where we are installed
            string installPath = GetAppInstallDirectory();

            // delete the files
            foreach (string appFile in Directory.GetFiles(installPath))
            {
                File.Delete(appFile);
            }

            // delete the folder
            Directory.Delete(installPath);
        }
    }
}

سǹ 仵ͧõԴ 㹺ਤ sampleApp ʴҧ

йسöԡҷਤ InstallerDLL ͡ Build ҧ dll ѺǺ鹵͹õԴ ѧǨ sampleAppInstallerDLLinRelease ѧٻ

ҧ INI File

سӡҧ sampleApp.ini ਤ sampleApp Ҩҧ text file ͹Ǥ rename sampleApp.ini ´ͧѧ仹

[CEAppManager]
Version = 1.0
Component = sampleApp

[sampleApp]
Description = Sample Application for PDA
CabFiles = sampleCab.cab

سѧࡵ CabFiles դ繪ͧ͢ cab file ҡਤ sampleCab ͧ

ҧ MSI

msi Դ駻֧ 辺繡ѹ· Ըա㹡ҧѧǨӴѺ鹵͹ѧ仹
ҡ ͡ਤ ҡ File > Add > New Project ҡ͡ Project types Setup and Deployment > Setup Project С˹ Name DeploymentMSI ѧٻ

ԡʹҾ˭

File System(DeploymentMSI) ӡäԡҷ Application Folder ͡ Add > Project Output... ѧٻ

ԡʹҾ˭

лҡ˹ҵҧ ӡ͡ Project InstallerDLL ͡ҹҧ Primary output ԡ OK ׹ѹ ѧٻ

File System(DeploymentMSI) ӡäԡҷ ͧҧ ͡ Add Special Folder > System Folder ѧٻ

ҡ鹷ӡäԡҷ System Folder ͡ Add > Folder ˹ Temp ѧٻ

ԡҷ Temp ӡ͡ Add > Folder ˹ sampleApp ѧٻ

ԡҷ sampleApp ӡ͡ Add > Project output... лҡ˹ҵҧ سӡ͡ Project sampleCab зӡäԡ OK ѧٻ

ԡҷ sampleApp ա ӡ͡ Add > File ҡӡ͡ sampleApp.ini աҧ 㹡кǹ ҧ INI File ŷʴѧٻ

кǹõ 繡ù InstallerDLL ͹ǺõԴ駢ͧ
ҡ ӡäԡҷਤ DeploymentMSI ͡ View > Custom Actions ѧٻ

лҡ Custom Actions ӡäԡҷͤ͹ Custom Actions ͡ Add Custom Action ѧٻ

˹ҵҧ Select Item in Project سѺŤԡ Application Folder лҡ¡âͧ Primary output from InstallDLL (Active) ҡ鹹ԡ OK ׹ѹ ѧٻ

ԡʹҾ˭

ŷ աùҡкǹ÷ӧҹҡ InstallerDLL Ҵѧٻ

кǹش¤ سӡäԡҷਤ DeploymentMSI ҡ͡ Build ͨз Build succeeded
Ũҡ ԹùҨ 2 msi exe ѧʴٻ

ҧҡ öǷҧ㹡ҧԴ駺 PDA Ѻûء 㹺ҧ駵ͧá 䢤Ңͧŵҧ Ҩлʺѭͧ ҡҤس ӵ 礧ͨЪ÷ӧҹͧس¢鹤Ѻ ѧҤ繻ªҡ Ѻ͹ѡѲҷءҹ ǾѹѺ 9'M

: Ŵҧ (Ŵ 2,203 )
 

- - - - - - - - - - - - - - ʹѺʹع- - - - - - - - - - - - - -


49.49.226.83 Դ #57 (ҡ IP: 49.49.226.83)
vs c# ӵآ鹵͹Դ ÷ Installer
""" + Path.Combine(installPath, CEAPPMGR_INI_FILE) + """
ҡس : Krit / krit.em@gmail.com [2016-06-17 14:37:44]

49.49.226.83 Դ #58 (ҡ IP: 49.49.226.83)
vs2008 c# Ѻ ͺسѺ
ҡس : Krit / krit.em@gmail.com [2016-06-17 14:39:30]

103.5.25.94 Դ #59 (ҡ IP: 103.5.25.94)
Ѻ س "Դ" ͧ֡ ҨзҺ Ҥس"Դ" ҧ բͤ error ͧ error 令ҴѧԴҡ ?

. ʵ ҡش
ҡس : maddog [2016-06-18 15:21:09]
ͺ
´

 
 
µͨ Ѻͧ macbook pro 2016 (usb-c to HDMI)
µͨ Ѻͧ macbook pro 2016 (usb-c to HDMI) ´дѺ 4K
ŧ Mini DisplayPort to HDMI Adapter ŧ Mini DisplayPort to HDMI Adapter Ѻͧ macbook air/pro, mac mini
ŧ Mini DisplayPort to HDMI Adapter Ѻͧ macbook air/pro, mac mini
µٿѧ Ъ Ѻ iPhone 7  7 Plus
µٿѧ Ъ Ѻ iPhone 7 7 Plus
ŧҡ USB-C Type  USB 3.1 Ѻ MacBook
ŧҡ USB-C Type USB 3.1 Ѻ MacBook
䢤ǧѺͧ Macbook Air/Pro
䢤ǧ Ѻͧ Macbook Air/Pro (300ҷ)
HDMI  3 ͡  1
HDMI 3 ͡ 1 (350ҷ)
Ի͹¹
¹¹ͷ
¹¹͹´
¹¹
¹¹ վʾ
¹¹
¹ҹԹء
¹¹Թ⿹
¹¹Ϊ ʤ
9M Blog ͧ͡ ¹ͧ
ԡ ҾѺԭ
OrmSin.com: ˹ѧͧҹ--չ (country crafts)
ѵҤɳ
 
Ǣͧ

Դ ѡѺ Emulator Visual Studio 2005 (PPC2003)

ö Run Emulator ͧ Pocket PC2002 ҧ (Ҥ 2)

ö Run Emulator ͧ Pocket PC2002 ҧ

þѲ Pocket PC & Smartphone
Tutorial
eVB Tutorial
ASP.NET Webmatrix Tutorial
J2ME Tutorial
C++  Tutorial
Java  Tutorial
PHP Tutorial
ASP Tutorial
 
ẺǨ
Freelance ѺѲ

Home - Article - Tutorial - Sourcecode - Dev Handbook - Search - WebBoard - Links - About Us

ʧǹԢԷ Ѵ͡ ӫ Ѵŧ ٻẺ Ѻ͹حҵѡɳѡ
Ţ¹ҳԪ硷͹ԡҡзǧҳԪ: 7100503002000
Copyright 2001 SourceCode.in.th